Why does my release mode Rust executable contain strings with absolute path names?

Viewed 282

I just built my first Rust hello world program followed by a websocket client, compiled with:

cargo build --release

Scouring the 216 KB executable inside hello_cargo\target\release with a hex editor I see:

C:\\Users\\GirkovArpa\\.cargo\\registry\\src\\github.com-1ecd2293db9ea513\\embedded-websocket-0.3.0\\src\\lib.rs
C:\\Users\\GirkovArpa\\.cargo\\registry\\src\\github.com-1ecd2293db9ea513\\heapless-0.5.5\\src\\string.rs
C:\\Users\\GirkovArpa\\.cargo\\registry\\src\\github.com-1ecd2293db9ea513\\rand-0.7.3\\src\\rngs\\thread.rs
C:\\Users\\GirkovArpa\\Documents\\GitHub\\hello_cargo\\target\\release\\deps\\hello_cargo.pdb

And a couple more strings like this. And this is after running strip hello_cargo.exe.

How do I avoid this?

1 Answers
Related