News for hackers. Stuff that matters.
Re:Zig's Incremental Compilation Internals by skavi on Tuesday July 28, 2026 @02:16PM (#49087818)
> The real trick is to do demand-driven compilation starting from the actual final program's needs

this is not so far off from hint-mostly-unused, no?

Re:Zig's Incremental Compilation Internals by NobodyNada on Tuesday July 28, 2026 @03:19PM (#49088630)
hint-mostly-unused defers codegen of a crate's functions until compiling a dependent crate where those functions are actually called. Therefore, unused functions will not need to be codegen'd.

The downside is that functions which are called from multiple dependent crates will need to be codegen'd in each of their dependents, so this can increase compile times if the crate is not "mostly unused."

So it's not quite as powerful as full demand-driven compilation, because of how Rust separates the compilation process into separate crates.

Re:Zig's Incremental Compilation Internals by IshKebab on Tuesday July 28, 2026 @05:57PM (#49090458)
Can't you just cache them?
Re:Zig's Incremental Compilation Internals by steveklabnik on Tuesday July 28, 2026 @02:39PM (#49088113)
In my understanding, it's similar, yeah. I don't know enough about how hint-mostly-unused works internally to really speak to the specific differences here.