Skip to content

Commit

Permalink
Update README for Rust 1.59 strip feature (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
Frago9876543210 authored Feb 26, 2022
1 parent f81d8ba commit 75b00ba
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ $ cargo build --release

![OS: *nix](https://img.shields.io/badge/OS-*nix-brightgreen.svg)

> Note: Looking for a tool to help automated `strip`ing? Check out
[`cargo-strip`](https://github.com/guedou/cargo-strip) or follow
[Cargo #3483](https://github.com/rust-lang/cargo/issues/3483).

> See also: [`sstrip`](https://github.com/BR903/ELFkickers) a small utility that removes a few
bytes from an executable that strip leaves behind. `sstrip` should be run after `strip`.

By default on Linux and macOS, symbol information is included in the compiled `.elf` file. This
information is not needed to properly execute the binary.
To remove this, run [`strip`](https://linux.die.net/man/1/strip) on the `.elf` file:
Expand All @@ -46,16 +39,13 @@ To remove this, run [`strip`](https://linux.die.net/man/1/strip) on the `.elf` f
$ strip target/release/min-sized-rust
```

Available starting `1.45.0-nightly (2020-05-28)`,
[Cargo has `strip` functionality built in](https://doc.rust-lang.org/cargo/reference/unstable.html#profile-strip-option):
[Cargo has `strip` functionality built in](https://doc.rust-lang.org/cargo/reference/profiles.html#strip):

![Minimum Rust: Nightly](https://img.shields.io/badge/Minimum%20Rust%20Version-nightly%201.45.0-orange.svg)
![Minimum Rust: 1.59](https://img.shields.io/badge/Minimum%20Rust%20Version-1.59-brightgreen.svg)

Modify `Cargo.toml` in this way:

```toml
cargo-features = ["strip"]

[profile.release]
strip = true # Automatically strip symbols from the binary.
```
Expand Down

0 comments on commit 75b00ba

Please sign in to comment.