Strategies for libraries to support multiple Zig versions?
Ziggit
Strategies for libraries to support multiple Zig versions?
How do folks handle coding for different Zig versions? For example, for users on Zig 0.16.0, they might use the std.fmt.allocPrint function. Perfectly fine: Zig Documentation Buuuut someone else might be running Zig 0.17.0-dev.1509+bb296ab9b. In that version, allocPrint says: Zig Documentation Deprecated in favor of Allocator.print. I’m writing a library, and ideally, I’d like to support 0.16.0 and latest main. Is there a way I could say something like this in my library? if (version == 0...
0 comments
No comments yet.