logoalt Hacker News

NobodyNadayesterday at 7:19 PM1 replyview on HN

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.


Replies

IshKebabyesterday at 9:57 PM

Can't you just cache them?