Skip to content

Commit 8605d60

Browse files
committed
document rust caveats
1 parent 1d3f8e1 commit 8605d60

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ sccache - Shared Compilation Cache
55

66
Sccache is a [ccache](https://ccache.samba.org/)-like tool. It is used as a compiler wrapper and avoids compilation when possible, storing a cache in a remote storage using the S3 API.
77

8+
Sccache now includes [experimental Rust support](docs/Rust.md).
9+
810
It works as a client-server. The client spawns a server if one is not running already, and sends the wrapped command line as a request to the server, which then does the work and returns stdout/stderr for the job. The client-server model allows the server to be more efficient in its handling of the remote storage.
911

1012
Sccache can also be used with local storage instead of remote.

docs/Rust.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
sccache now includes experimental 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:
2+
* `--emit` is required.
3+
* Only `link` and `dep-info` are supported as `--emit` values, and `link` must be present.
4+
* `--out-dir` is required.
5+
* `-o file` is not supported.
6+
* Compilation from stdin is not supported, a source file must be provided.
7+
* Values from `env!` will not be tracked in caching.
8+
* Procedural macros that read files from the filesystem may not be cached properly
9+
* The system linker is not factored in as a cache input, so changing the linker may produce incorrect cached results.
10+
* Target specs aren't hashed (e.g. custom target specs)

0 commit comments

Comments
 (0)