From: Peter Marheine Date: Mon, 8 Jan 2018 04:54:18 +0000 (+1100) Subject: Recover doc mention of sccache X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~3^2~55^2~15 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=05043ab742fb72ae6ad02cd0c7d117657b54a4db;p=cargo.git Recover doc mention of sccache Cherry-picked from 13bb7bd95b457f7383487cf8dcf476009939cfac which failed to update the book and was replaced in 1271bb4de0c0e0a085be239c2418af9c673ffc87. --- diff --git a/src/doc/src/guide/build-cache.md b/src/doc/src/guide/build-cache.md new file mode 100644 index 000000000..f3b62e700 --- /dev/null +++ b/src/doc/src/guide/build-cache.md @@ -0,0 +1,14 @@ +## 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 + + diff --git a/src/doc/src/guide/index.md b/src/doc/src/guide/index.md index d8bfda17c..c8a61b28d 100644 --- a/src/doc/src/guide/index.md +++ b/src/doc/src/guide/index.md @@ -11,3 +11,4 @@ develop Rust projects. * [Cargo.toml vs Cargo.lock](guide/cargo-toml-vs-cargo-lock.html) * [Tests](guide/tests.html) * [Continuous Integration](guide/continuous-integration.html) +* [Build Cache](guide/build-cache.html)