https://github.com/guedou/cargo-strip
Strip Rust binaries created with cargo
https://github.com/guedou/cargo-strip
binary cargo rust strip
Last synced: 10 months ago
JSON representation
Strip Rust binaries created with cargo
- Host: GitHub
- URL: https://github.com/guedou/cargo-strip
- Owner: guedou
- License: mit
- Created: 2019-12-28T14:53:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-28T20:25:57.000Z (over 4 years ago)
- Last Synced: 2025-08-17T15:49:59.358Z (11 months ago)
- Topics: binary, cargo, rust, strip
- Language: Rust
- Homepage:
- Size: 27.3 KB
- Stars: 90
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cargo-strip
[](https://crates.io/crates/cargo-strip)

[](https://twitter.com/intent/follow?screen_name=guedou)
As of Rust 1.59, the `cargo` command is now able to [strip a binary](https://doc.rust-lang.org/beta/cargo/reference/profiles.html#strip). This can be enabled in your `Cargo.toml` in the following way:
```
[package]
# ...
[profile.release]
strip="debuginfo"
```
---
A cargo subcommand that reduces the size of Rust binaries using the `strip` command.
## Installation & Usage
Run the following command:
```
cargo install --force cargo-strip
```
Simply strip your binary with:
```
cargo strip
```
When cross-compiling, the `--target` could be used to strip the binary, such as:
```
cargo strip --target armv7-unknown-linux-gnueabihf
```