I can't build when set rustc-wrapper

if I set

[build]
rustc-wrapper = "~/APP/sccache-0.2.13-x86_64-unknown-linux-musl/sccache"

i will get error 2 when i build my project.

$ cargo build --release
error: failed to run rustc to learn about target-specific information

Caused by:
could not execute process ~/APP/sccache-0.2.13-x86_64-unknown-linux-musl/sccache rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg (never executed)

Caused by:
No such file or directory (os error 2)

if i remove the rustc-wrapper setting, everthing is fine.

system info:
WSL2 Ubuntu 20.04 LTS
cargo 1.45.1 (f242df6ed 2020-07-22)
rustc 1.45.2 (d3fb005a3 2020-07-31)
sccache 0.2.13

.I want try sccache,please help me :face_with_thermometer:

Does replacing ~ with the full path to your home directory help?

1 Like

You are so clever.
This bothering me for a long time

Problem solving :grinning:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.