Skip to content

Commit 13bb7bd

Browse files
committed
Mention sccache in the guide
1 parent 8ee4341 commit 13bb7bd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/doc/guide.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,21 @@ will not fail your overall build. Please see the [Travis CI Rust
419419
documentation](https://docs.travis-ci.com/user/languages/rust/) for more
420420
information.
421421
422+
423+
## Build cache
424+
425+
Cargo shares build artifacts among all the packages of a single workspaces.
426+
Today, Cargo does not share build results across different workspaces, but
427+
a similar result can be achieved by using a third party tool, [sccache].
428+
429+
To setup `sccache`, install it with `cargo install sccache` and set
430+
`RUSTC_WRAPPER` environmental variable to `sccache` before invoking Cargo.
431+
If you use bash, it makes sense to add `export RUSTC_WRAPPER=sccache` to
432+
`.bashrc`. Refer to sccache documentation for more details.
433+
434+
[sccache]: https://github.com/mozilla/sccache
435+
436+
422437
# Further reading
423438

424439
Now that you have an overview of how to use cargo and have created your first

0 commit comments

Comments
 (0)