News for hackers. Stuff that matters.
Re:2 years of fiddling with Rust – critical thoughts by rowanG077 on Sunday November 06, 2022 @05:39PM (#33498245)
I honestly don't get the compile speed hate. Rust compilation is inconceivably fast to me. Like what are you incrementally compiling that takes you out of the dev flow?
Re:2 years of fiddling with Rust – critical thoughts by errantmind on Sunday November 06, 2022 @06:09PM (#33498563)
Linking is often the slow part for large projects. Switching to the Mold linker can help some, but it can still be relatively slow on a lot of hardware.

Overall I agree with you though, it isn't slow enough on my hardware to interrupt my dev-flow.

Re:2 years of fiddling with Rust – critical thoughts by cstrahan on Sunday November 06, 2022 @06:14PM (#33498607)
Depending on what part I touch, a recompile is 20 to 60 seconds. This is a project at work — an HTTP server that runs some stuff on an interpreted language we’ve developed in-house.

Not the end of the world, but a bit annoying nonetheless.

Re:2 years of fiddling with Rust – critical thoughts by insanitybit on Sunday November 06, 2022 @07:28PM (#33499417)
Is that just running `cargo check`? There's a pretty solid profiler that I've used before to identify slow parts of a build and address them.

https://blog.rust-lang.org/inside-rust/2020/02/25/intro-rust...

Re:2 years of fiddling with Rust – critical thoughts by slondr on Sunday November 06, 2022 @06:22PM (#33498719)
On my phone a Rust program of significant size can take multiple hours to finish compiling, where a C program of comparable size would take about an hour or slightly less.

No reason to discard the language, for sure, and I don't avoid compiling from source even on this machine, but it's definitely worse than C.

Re:2 years of fiddling with Rust – critical thoughts by woodruffw on Sunday November 06, 2022 @07:07PM (#33499204)
Maybe this is a silly question, but why are you compiling Rust programs on a smartphone?
Re:2 years of fiddling with Rust – critical thoughts by Gigachad on Sunday November 06, 2022 @10:18PM (#33500697)
Not the same person, but programming on phones with Bluetooth keyboards is very common for people learning in developing countries since everyone has a phone, and many do not have a laptop.
Re:2 years of fiddling with Rust – critical thoughts by woodruffw on Sunday November 06, 2022 @10:32PM (#33500790)
I didn't know that, thanks for the explanation! I can absolutely see slow compilations being a problem in that setting.
Re:2 years of fiddling with Rust – critical thoughts by echelon on Sunday November 06, 2022 @06:23PM (#33498723)
I have a Rust monorepo with about a dozen microservice apps and two dozen shared libraries.

The compile times are inconvenient, to put it mildly. Production release builds take approximately 40 minutes and are especially painful when I forget to codegen the SQL schema definitions (sqlx).

At some point I need to invest in CI devops and use Bazel build caching.

Pain aside, the ability to share code is glorious. Clion + Rust plugin does a tremendous job navigating it all.

Re:2 years of fiddling with Rust – critical thoughts by pas on Sunday November 06, 2022 @06:57PM (#33499090)
for CI have you tried to use buildkit persistent runners with caching + https://github.com/LukeMathWalker/cargo-chef ?
Re:2 years of fiddling with Rust – critical thoughts by Gigachad on Sunday November 06, 2022 @10:20PM (#33500711)
It’s always the libraries that do it. It’s pretty easy to pull in enough library code that your own app code is nothing compared to compiling the web server and ORM you imported.

But even then I haven’t seen it as that much of an issue.