Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/Rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@ sccache includes support for caching Rust compilation. This includes many caveat
* Procedural macros that read files from the filesystem may not be cached properly.
* `rustc`'s incremental compilation needs to be disabled. See [The Cargo Book](https://doc.rust-lang.org/cargo/reference/profiles.html#incremental)
* Crates that invoke the system linker cannot be cached. Examples are `bin`, `dylib`, `cdylib`, and `proc-macro` crates.
* `SCCACHE_BASEDIRS` normalizes paths in Rust cache keys when rustc's `--remap-path-prefix` covers the working directory with the default or `all` remap scope. It does not rewrite compiler outputs itself.
* Cargo path variables remain location-sensitive when external crates are present because transitive procedural macros can read them without reporting an environment dependency to rustc.
* Rust path normalization is limited to ASCII paths on Windows.
* Distributed Rust compilation falls back to local compilation when `--remap-path-prefix` is used with a non-identity path transformer.

If you are using Rust 1.18 or later, you can ask cargo to wrap all compilation with sccache by setting `RUSTC_WRAPPER=sccache` in your build environment.
Loading