2 ms·
Even those may not be powerful enough. I have a use case where I was trying to read specification files to generate unicode tables. But using something like zig
by lhorie 5y ago
Even those may not be powerful enough. I have a use case where I was trying to read specification files to generate unicode tables. But using something like zig's @embedFile to get a handle to a []u8 in a comptime block doesn't work because I don't want the file to be embedded into the binary; I want something more akin to turing complete code generation. And I don't need it to run it on every compile, as the entire flow involves downloading said files off the internet, but only when a new version of the spec is released. I ended up just using code generation.
- samatman 5y agoZig is a work in progress, and I bet the community is interested in supporting this sort of use case. Might be nice to bring it to their attention, if you haven't already, and if you have the time and inclination.
- kaba0 5y agoI think at this point it should rather be part of the build process. No program build itself should download files in an ad hoc manner.