I work on Tuist. We just shipped Cargo support in CLI 4.218.0.

tuist cargo build caches rustc outputs, including workspace crates. The key is based on what rustc and build scripts actually read. Checkout and toolchain paths are replaced with placeholders, so a checkout at a different path on the same machine can reuse the same entries.

Every rustc invocation also shows up with how long it took.

tuist cargo test looks at CI runs of the same commit and flags tests that only fail sometimes. You can mute those so they still run, but a failure doesn't fail the command.

Setup is one table in the root Cargo.toml:

[workspace.metadata.tuist] project = "account/project" 

You need Tuist 4.218.0 or later, then tuist auth login and tuist cargo build / tuist cargo test. Arguments go straight to Cargo.

The cache is experimental. It's qualified on Apple silicon. Linux caching works on x86_64 and arm64 with glibc, but it isn't qualified yet.

The CLI is MIT. Open source projects can use the hosted service for free.

More detail is in this write-up: Cut Rust compile time with a Tuist Cargo cache

If you have build scripts you think would break that kind of keying, I'd like to hear about them.

1 post - 1 participant

Read full topic