[#36] Zig Roadmap 2024 - Andrew Kelley

C/C++ “incremental compilation” is kind of fake. It relies on creating a different compilation unit for each file, and linking the object files together in the end. This is not really great. If you for example change a header file that is included everywhere, you end up having to recompile everything. Additionally the linking step quickly becomes a bottleneck.
By the way from what I have seen Zig already supports this kind of incremental compilation. You can, if you want, compile code into different object files and link them together.

I think what Andrew is talking about here is incremental compilation at the function level. So if you update one function in a file it will only update this one function and it’s dependents and nothing more. Additionally I think the plan is to have linker level support, so the linker only needs to update a small part of the entire binary instead of regenerating it completely.

9 Likes