File: Rust.md

package info (click to toggle)
sccache 0.4.0~~pre6-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,920 kB
  • sloc: sh: 383; perl: 255; python: 148; ansic: 31; makefile: 16
file content (12 lines) | stat: -rw-r--r-- 836 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
sccache includes support for caching Rust compilation. This includes many caveats, and is primarily focused on caching rustc invocations as produced by cargo. A (possibly-incomplete) list follows:
* `--emit` is required.
* `--crate-name` is required.
* Only `link` and `dep-info` are supported as `--emit` values, and `link` must be present.
* `--out-dir` is required.
* `-o file` is not supported.
* Compilation from stdin is not supported, a source file must be provided.
* Values from `env!` require Rust >= 1.46 to be tracked in caching.
* Procedural macros that read files from the filesystem may not be cached properly
* Target specs aren't hashed (e.g. custom target specs)

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.