Comment by duped

2 years ago

I still don't see why this is a problem. Single-header dependencies are cute but blow up compile times, and most of the world needs CMake/Meson/Autotools anyways so there's not an added cost to using it for your own projects.

Similarly I don't really understand why you want one toolchain for a multi-language project. It's not that useful or convenient since it's going to need to be orchestrated with a buildsystem somehow.

Like with Rust, you probably only have a build.rs file. It invokes a separate (possibly multiple) toolchains. Or with CMake. A simple project has a single CMakeLists.txt that can invoke any number of toolchains. I don't see why zig can't do that with a build.zig file, or why it matters.

Did you try the stuff you are proposing? This is all a royal pita in real world projects which the Zig toolchain solved wonderfully.

(also it's a myth that STB style libs increase compile time, that's only true for typical C++ header-only libs with inline methods and template code)