Show HN: Fleet – Experimental build tool for Rust that’s up to 5x faster
63 points| VarunPotti | 3 years ago | reply
Builds with Fleet enabled are up-to 5x faster!
For a production repository (infinyon/fluvio) which we tested, we were able to cut down our incremental build times from 29 seconds down to 9 seconds, boosted by Fleet. We saw even better results on dimensionhq/volt, with our build times cut down from 3 minutes to just 1 minute - a 3x speed improvement!
How does fleet work?
Fleet works by optimizing your builds using existing tooling available in the Rust ecosystem, including seamlessly integrating sccache, lld, zld, ramdisks (for those using WSL or HDD's) et al.
You can get fleet at the official website.
Check out fleet over at https://github.com/dimensionhq/fleet and our website at https://fleet.rs
Looking forward to your feedback and thoughts!
[+] [-] vladvasiliu|3 years ago|reply
Does it do anything else besides using sccache and lld/zld? I'd expect so, since these tools don't require rust nightly, whereas fleet does.
---
Edit:
After a quick look over the code, it also sets codegen units to 256, but doesn't seem to do anything else.
I see the same improvements adding manually sccache and mold to ~/.cargo/config.toml when building volt, without touching the repo's Cargo.toml.
standard rust config: 1m20s
sccache + mold: 30s
I ran the tests with Rust 1.60.0, on Linux, on an AMD 5850U (6 core, mobile).
[+] [-] XtremeDevX|3 years ago|reply
Also great question about using nightly, we're using a shared-generics flag that requires nightly (and speeds up build times).
We're working on making this more configurable to enable / disable what features you want.
[+] [-] XtremeDevX|3 years ago|reply
Our go-to linker was actually mold until we realized that their license is not compatible with ours.
We also use shared-generics to try to speed up builds, along with the ramdisk that I previously mentioned.
[+] [-] Klasiaster|3 years ago|reply
[+] [-] pedrocr|3 years ago|reply
[+] [-] lewantmontreal|3 years ago|reply
I wonder if in the future some service might even offer prebuilt crates for the various architectures. I think that idea was brought up at some point.
[+] [-] thejosh|3 years ago|reply
A recent solution was to precompile these binaries. It's great.
[0] https://github.com/rusterlium/rustler [1] https://dashbit.co/blog/rustler-precompiled
[+] [-] johnwoods|3 years ago|reply
[+] [-] firstSpeaker|3 years ago|reply
[+] [-] elssar|3 years ago|reply
[+] [-] paulgb|3 years ago|reply
[+] [-] VarunPotti|3 years ago|reply
[+] [-] unknown|3 years ago|reply
[deleted]
[+] [-] unknown|3 years ago|reply
[deleted]
[+] [-] the__alchemist|3 years ago|reply
My primate pattern-matching brain says this is functionality-poor compared to its alternatives, or the alternatives it compares to are poor examples.
[+] [-] blarg1|3 years ago|reply
[+] [-] blarg1|3 years ago|reply
https://fleet.rs/docs/commands/build
[+] [-] qeternity|3 years ago|reply
Not sure your maths are correct here.
[+] [-] boredstealth|3 years ago|reply