Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you have a single source file that's big enough for the compiler to bog down on it, then either that compiler is beyond ridiculously slow, or you need to refactor.


The tricky part is the dependencies between files. This is what C++ uses header files for, but Rust doesn't have those.


Languages like Go and Java can do separate compilation by reading header information out of the object files of imported packages/classes.


Rust has been doing that since day one.

What makes this incremental compilation different from that of, say, Go, is that it works inside a package. Before incremental compilation, Rust and Go had the exact same model: package-at-a-time compilation. With incremental compilation, Rust is more fine-grained than that: Rust can compile specific parts of a package while leaving the other parts untouched.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: