Re:Rust Is Surprisingly Good as a Server Language
by steveklabnik on Monday July 13, 2020 @08:01AM
(#23819805)
Let me put it a stronger way: if you're seeing your cargo dependencies recompile every time, it is a bug. Please file one upstream. These bugs do happen, but they are bugs.
Re:Rust Is Surprisingly Good as a Server Language
by johnfn on Monday July 13, 2020 @01:33PM
(#23823291)
I don't literally see my deps compile. It's just that compile time gets slower. (I wonder if it's related to the linker?) Is that still a bug? Would be happy to report it if so.
Re:Rust Is Surprisingly Good as a Server Language
by estebank on Monday July 13, 2020 @02:31PM
(#23823977)
If the slowless you're seeing is caused by the linker, which can very well be the case, consider using LLD as you can see significant speed improvements to the linking step.
https://github.com/rust-lang/rust/issues/39915#issuecomment-...
https://doc.rust-lang.org/1.22.0/unstable-book/compiler-flag...
If installed, you can run
RUSTFLAGS="-Clink-arg=-fuse-ld=lld" cargo build --release
Re:Rust Is Surprisingly Good as a Server Language
by johnfn on Monday July 13, 2020 @03:21PM
(#23824530)
Looked into this :) unfortunately I run Mac so there's nothing I can do here. Tempted to dual boot Ubuntu, though.
Re:Rust Is Surprisingly Good as a Server Language
by estebank on Monday July 13, 2020 @05:01PM
(#23825515)
It's a shame. I'm on the same boat and not being able to use lld adds a literal minute to my builds :-/
Re:Rust Is Surprisingly Good as a Server Language
by steveklabnik on Monday July 13, 2020 @02:10PM
(#23823719)
Ahh.
I am less sure, but I would think that's expected, given that it has to link everything together into the final binary. You're gonna end up giving the linker more work to do, as you suspected.
I LOVE rust-analyzer. It's actually what got me to reconsider Rust after I tried a year or two ago, and it is SO good.