Automatically stripping binaries with `cargo install`

Hi all,

I’ve just set up a new Banana Pi and I need small binaries for various tools I use (such as ripgrep, fd, &c.). So far I’ve just called strip on them manually, but I was wondering if cargo could do this automatically (I haven’t seen anything in --help and I couldn’t find manpages…)


It’s not possible at the moment AFAIK.

Known problem:

I think this is not something that should require a build script, but rather an action cargo install should (probably?) always perform.


Yes, I agree. cabal-install has an option to strip binaries (which doesn’t work but…). I think it would be a good feature since much Rust software is distributing via cargo install.