5 ms·
That's only because they just started working on incremental compilation, it will get faster soon enough.
by AsyncAwait 9y ago
That's only because they just started working on incremental compilation, it will get faster soon enough.
- jhasse 9y agoI've heard the same thing a year ago. It didn't happen. See this 2016 roadmap from August 2015 for example: https://blog.rust-lang.org/2015/08/14/Next-year.html https://blog.rust-lang.org/2015/08/14/Next-year.html
- DiThi 9y agoA lot of things did happen. One of them is having the option to check the source which is much faster than compiling. 99% of the time you're compiling code in rust is to run the borrow checker and fix those errors.
- jhasse 9y agoThat's indeed something where Rust is a lot better than C++. But for many projects (like games or GUI apps) you'll need to iterate with changes which can only be seen in the final product. So you'll need a complete build to run the binary.
- DiThi 9y agoFair enough. However games and GUI apps are still a small percentage of applications developed in rust. I want that to change, of course. I just wanted to point that out. I'm personally writing a game in Rust but the main logic is written in a compile-to-JS language and uses V8, so the issue doesn't affect me.
- steveklabnik 9y agoThe basics have happened, and you can use it right now. It's not on by default yet though. Still a ton of work being done.
- jhasse 9y agoYeah, last time I've tried it (a few months ago) incremental build times where a lot slower for a full rebuild and only about 10 % faster when touching a single rs file. I've already found a few issues and it seems you guys are working on it :) But as of now: C++ incremental build times (with the right build system) are a lot better than Rust's.
- pcwalton 9y agoIncremental compilation is something that no major compiler for any ahead-of-time compiled language anywhere does. It's one of the most advanced features in any compiler, and as such it's taking time to implement. No C++ compiler I know of is even thinking of it. As the first post here in this thread mentions, going down the C++ road of header files might have gotten us some short term wins, but ultimately it hits a brick wall. Incremental compilation is inescapable.
- pjmlp 9y agoI surely do consider Visual C++ a major compiler for any ahead-of-time compiled language. It does incremental compilation and incremental linking. I would be quite happy if cargo was half as fast as my UWP projects.