You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -68,7 +70,7 @@ Build with `cargo` and use `ldd` to check that the resulting binary does not dep
68
70
69
71
Just setting the below environment variable will enable static linking.
70
72
71
-
```
73
+
```bash
72
74
export OPENSSL_STATIC=yes
73
75
```
74
76
@@ -80,7 +82,7 @@ On Windows it is fairly straight forward to just ship the required `libcrypto` a
80
82
81
83
It is possible to statically link against the CRT using a `.cargo/config` file with the following contents.
82
84
83
-
```
85
+
```toml
84
86
[target.x86_64-pc-windows-msvc]
85
87
rustflags = ["-Ctarget-feature=+crt-static"]
86
88
```
@@ -105,13 +107,17 @@ set OPENSSL_LIBS=libcrypto64MT:libssl64MT
105
107
106
108
### With Rust
107
109
108
-
`$ cargo install sccache`
110
+
```bash
111
+
cargo install sccache
112
+
```
109
113
110
114
### Windows
111
115
112
116
sccache can also be installed via [scoop](https://scoop.sh/)
113
117
114
-
`> scoop install sccache`
118
+
```
119
+
scoop install sccache
120
+
```
115
121
116
122
---
117
123
@@ -120,11 +126,24 @@ Usage
120
126
121
127
Running sccache is like running ccache: wrap your compilation commands with it, like so:
122
128
123
-
> $ sccache gcc -o foo.o -c foo.c
129
+
```bash
130
+
sccache gcc -o foo.o -c foo.c
131
+
```
132
+
133
+
If you want to use sccache for your rust builds you can define `build.rustc-wrapper` in the
134
+
[cargo configuration file](https://doc.rust-lang.org/cargo/reference/config.html). For example, you can set it globally
135
+
in `$HOME/.cargo/config` by adding:
124
136
125
-
or use it with rust, like so:
137
+
```toml
138
+
[build]
139
+
rustc-wrapper = "[path to sccache]"
140
+
```
141
+
142
+
Alternatively you can use the environment variable `RUSTC_WRAPPER`:
126
143
127
-
> $ RUSTC_WRAPPER=[path to sccache] cargo build
144
+
```text
145
+
RUSTC_WRAPPER=[path to sccache] cargo build
146
+
```
128
147
129
148
Sccache (tries to) support gcc, clang, [diab](https://www.windriver.com/products/development-tools/#diab_compiler) and MSVC. If you don't [specify otherwise](#storage-options), sccache will use a local disk cache.
0 commit comments