6 ms·
Show HN: Fleet – Experimental build tool for Rust that’s up to 5x faster
Fleet is an experimental fast, lightweight, open-source, build tool for Rust.
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!
- blarg1 4y agoI installed it via the cargo install method, do I have to do anything else like modify cargo config files?
- blarg1 4y agoAh nvm, looked up the docs :) https://fleet.rs/docs/commands/build https://fleet.rs/docs/commands/build
- boredstealth 4y agoamazing! sounds very intresting
- deleted 4y ago[deleted]
- lewantmontreal 4y agoNice, faster rust builds are always welcome. 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 4y agoIn Elixir, when performance is needed and it's appropriate, we can use Rustler [0], however it's a PITA to ask developers to install rust, and you need it on CI etc to build the binaries. A recent solution was to precompile these binaries. It's great. [0] https://github.com/rusterlium/rustler https://github.com/rusterlium/rustler [1] https://dashbit.co/blog/rustler-precompiled https://dashbit.co/blog/rustler-precompiled
- firstSpeaker 4y agoNot to be confused with https://www.jetbrains.com/fleet/ https://www.jetbrains.com/fleet/
- elssar 4y agoOr with https://fleetdm.com https://fleetdm.com
- ghostpepper 4y agoOr https://www.elastic.co/guide/en/fleet/current/fleet-server.html https://www.elastic.co/guide/en/fleet/current/fleet-server.h...
- 2bitencryption 4y agoOr https://www.fleetlabs.com/constipation-relief-products/enemas/fleet-saline-enema https://www.fleetlabs.com/constipation-relief-products/enema...
- vladvasiliu 4y agoThe site and repo readme are quite light on details on how this works. 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).
- pedrocr 4y agoThe 5850U is the 8 core part. Maybe you mean 5650U?
- vladvasiliu 4y agoYou're correct, it was a typo.
- XtremeDevX 4y agoIt also uses ramdisk on WSL or for those who use hard-drives for builds. 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.
- vladvasiliu 4y ago> It also uses ramdisk on WSL or for those who use hard-drives for builds. Yeah, I skipped over this, considering that most people doing rust dev will likely have some kind of SSD. I didn't look into how you went about doing this, but one thing that I'd like is to be able to move the target/ directory on a ram disk, or, generally, out of the source root [0]. If Fleet were able to do this transparently, it would be really great. --- [0] I know it's possible to define an external directory, but it applies to all projects, and it's not what I want, because shared crates would go overwrite each other.
- paulgb 4y agoI’m excited to see this! Given that sccache integrates with cloud storage, this looks fairly straightforward to integrate in a CI/CD workflow, did I get that right?
- deleted 4y ago[deleted]
- VarunPotti 4y agoYep, we also made sure that we include examples so that you can easily use this with github workflows, it configures & caches all the installed apps so that you would get really fast builds . https://fleet.rs/docs/ci/linux https://fleet.rs/docs/ci/linux
- qeternity 4y ago> 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! Not sure your maths are correct here.
- the__alchemist 4y agoTop line: > Fleet is the blazing fast build tool My primate pattern-matching brain says this is functionality-poor compared to its alternatives, or the alternatives it compares to are poor examples.
- johnwoods 4y agoAs noted by another HN user, it's clear that this doesn't do anything interesting on Linux. Also, higher codegen units will produce slower code at times. Overall, on Linux I do not notice any significant improvement in build times (we already use sccache)