Skip to content

Commit 1ad4fe3

Browse files
committed
docs: advice when a customizable CARGO_HOME is wanted [skip ci]
refs #3
1 parent 198df57 commit 1ad4fe3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ docker run --rm \
4040
sh -c "cargo build --release --target x86_64-apple-darwin"
4141
```
4242

43+
### Cargo Home advice
44+
45+
It's known that the [g](https://doc.rust-lang.org/cargo/guide/cargo-home.html#cargo-home) points to `$HOME/.cargo` by default (`/root/.cargo` in this case). However if you want to use a custom Cargo home directory make sure to copy the Cargo `config` file to the particular directory like `cp "$HOME/.cargo/config" "$CARGO_HOME/"` before to cross-compile your program. Otherwise you could face a linkage error when for example you want to cross-compile to an `x86_64-apple-darwin` target.
46+
4347
### Dockerfile
4448

4549
You can also use the image as a base for your own Dockerfile:

0 commit comments

Comments
 (0)