4 ms·
Yes, here is an example for a non-trivial mixed C/C++ project: https://github.com/floooh/sokol-tools/blob/master/build.zig https://github.com/floooh/sokol-tool
by flohofwoe 5y ago
Yes, here is an example for a non-trivial mixed C/C++ project:
https://github.com/floooh/sokol-tools/blob/master/build.zig https://github.com/floooh/sokol-tools/blob/master/build.zig
Compared to cmake this means giving up IDE support like Xcode or Visual Studio though, it's really "just" a build system, not a meta-build system which can generate IDE project files.
The Zig build system also has some minor warts that don't matter much for a pure Zig project but do matter for C/C++ projects, mainly that build settings of dependencies (like header search paths or linker input) mostly don't automatically 'travel' upwards to the root, instead each dependency and root project needs to be configured on its own.
There are plenty of upsides too though, like much simplified cross-compilation, all in all it looks very promising.
- cyber_kinetist 5y agoCan it also generate compile_commands.json automatically? That is the only thing you need for IDE/editor support nowadays.
- flohofwoe 5y agoAFAIK no, sounds like a good feature to have though.