From: Aleksey Kladov Date: Sun, 3 Sep 2017 09:19:29 +0000 (+0300) Subject: Mention sccache in the guide X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~6^2~59^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=13bb7bd95b457f7383487cf8dcf476009939cfac;p=cargo.git Mention sccache in the guide --- diff --git a/src/doc/guide.md b/src/doc/guide.md index e8986f78f..fe8e0c070 100644 --- a/src/doc/guide.md +++ b/src/doc/guide.md @@ -419,6 +419,21 @@ will not fail your overall build. Please see the [Travis CI Rust documentation](https://docs.travis-ci.com/user/languages/rust/) for more information. + +## Build cache + +Cargo shares build artifacts among all the packages of a single workspaces. +Today, Cargo does not share build results across different workspaces, but +a similar result can be achieved by using a third party tool, [sccache]. + +To setup `sccache`, install it with `cargo install sccache` and set +`RUSTC_WRAPPER` environmental variable to `sccache` before invoking Cargo. +If you use bash, it makes sense to add `export RUSTC_WRAPPER=sccache` to +`.bashrc`. Refer to sccache documentation for more details. + +[sccache]: https://github.com/mozilla/sccache + + # Further reading Now that you have an overview of how to use cargo and have created your first