> The script bootstrap.sh installs ninja, zig and compiles LuaX
I think we're going to see more build instructions like this as time goes on. Zig installs are simple, self-contained, don't require root to install, and automatically handle C/C++ cross-compilation like magic. I suspect long term these benefits will put Zig in a position to become the best build tool for C/C++ projects. If you're already using it for your compiler, you might as well use it to write your build scripts.
And if you're already using zig cc to compile your C project, you might as well write the next module in Zig. I know of no other language which makes it quite so easy to produce C-compatible object code. Some of that is the design of the language itself, but a great portion of it is providing native C and C++ compilation, with a good build system and an excellent cross-compilation experience.
Projects which rely heavily on this feature are a bit nervous about the plans to break the LLVM dependency, but using the Zig toolchain this way is too important to the goals of the language to screw that part up.
So this lets you essentially run Lua standalone, and then compile those scripts into executables. Seems like a mix of Cython and bash. In going to give it a try, it might fill a niche of some dev tool scripts I make for the team.
This is probably compiling to bytecode (like luac) and bundling the result with the lua interpreter as an executable. Doing the latter by hand involves writing a very small C program that passes a static char array to the lua entry point - I think this is nicely packaging that process.
It might be compiling to native code instead but the readme doesn't look like it.
Right, sorry — to be clear, I brought it up because it's a pretty nice way to make executables easily from an embeddable scripting language and the approach is fairly unique among interpreted languages.
I think we're going to see more build instructions like this as time goes on. Zig installs are simple, self-contained, don't require root to install, and automatically handle C/C++ cross-compilation like magic. I suspect long term these benefits will put Zig in a position to become the best build tool for C/C++ projects. If you're already using it for your compiler, you might as well use it to write your build scripts.