Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/guedou/cargo-strip

Strip Rust binaries created with cargo
https://github.com/guedou/cargo-strip

binary cargo rust strip

Last synced: about 2 months ago
JSON representation

Strip Rust binaries created with cargo

Awesome Lists containing this project

README

        

# cargo-strip

[![crates.io badge](https://img.shields.io/crates/v/cargo-strip.svg)](https://crates.io/crates/cargo-strip)
![CI](https://github.com/guedou/cargo-strip/workflows/CI/badge.svg)
[![Twitter Follow](https://img.shields.io/twitter/follow/guedou.svg?style=social)](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
```