News for hackers. Stuff that matters.
Re:A Few More Reasons Rust Compiles Slowly by tym0 on Monday June 29, 2020 @02:51PM (#23680996)
Depends what you're building, I have what I would consider a small server app (Less than 10 JSON HTTP endpoints with some postgres), a dev incremental build takes 17.21s and a release build 7m 12s. A similar app in Go would probably take less than a second to build, they're obviously quite different languages but that doesn't feel that fast.
Re:A Few More Reasons Rust Compiles Slowly by cptskippy on Monday June 29, 2020 @03:27PM (#23681498)
I'm looking at the pipeline for smallish .NET Core Web App and the 6 projects build vary from 4-25sec each to build and with all the scaffolding it takes just under 5 minutes start-to-finish to produce binaries.
Re:A Few More Reasons Rust Compiles Slowly by xrisk on Monday June 29, 2020 @03:21PM (#23681418)
Is that because the libraries you link to are gigantic? Even so, the compiler shouldn’t be compiling those parts of the libraries that aren’t being used, right?
Re:A Few More Reasons Rust Compiles Slowly by pjmlp on Monday June 29, 2020 @03:51PM (#23681832)
So far cargo doesn't do binary dependencies, so when you start a project, or do CI/CD, it compiles the all world from scratch.
Re:A Few More Reasons Rust Compiles Slowly by chc on Monday June 29, 2020 @03:55PM (#23681870)
I'm not intimately familiar with the internals of rustc, but my impression was that everything gets compiled and dead code is later eliminated. In order to avoid compiling unnecessary stuff, you generally need to use feature flags (e.g. you can say "only compile this if the serialization feature is enabled").
Re:A Few More Reasons Rust Compiles Slowly by tym0 on Monday June 29, 2020 @03:39PM (#23681656)
Actix, Diesel, Serde and their dependencies are definitely most of build time.