Closed MarkProminic closed 3 years ago
I did a little bit of self help but need a bit of clarification:
https://rust-cli.github.io/book/tutorial/packaging.html
Unless you use crates that explicitly need external libraries to be installed on the target system (like using the system’s version of OpenSSL), this binary will only depend on common system libraries. That means, you take that one file, send it to people running the same operating system as you, and they’ll be able to run it.
Does this mean that I can move the binary file to let's say /usr/bin/ or some other bin folder?
Does this mean that I can move the binary file to let's say /usr/bin/ or some other bin folder?
Correct.
The binary is the only thing produced by the build process which is required to run it (assuming the target system uses the same architecture (ARM) and has similar libc, openssl and libnice installed, which will be the case if it is the same machine).
Everything else (i.e. the source folder and $HOME/.cargo
) can be removed.
Can you walk me through the process of cleaning up the source files after building this?
I was able to build this on my Ubuntu 20.10 ZFS on Raspberry Pi, and I would like to save some space, but I am not overly familiar with Cargo.