Skip to content

Commit 8cab50b

Browse files
committed
Fix Cargo strip documentation
1 parent 6ade516 commit 8cab50b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,17 @@ $ strip target/release/min-sized-rust
4444
```
4545

4646
Available starting `1.45.0-nightly (2020-05-28)`,
47-
[Cargo has `strip` functionality built in](https://github.com/rust-lang/cargo/pull/8246):
47+
[Cargo has `strip` functionality built in](https://doc.rust-lang.org/cargo/reference/unstable.html#profile-strip-option):
4848

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

51-
```bash
52-
$ cargo +nightly build -Z strip=symbols
51+
Modify `Cargo.toml` in this way:
52+
53+
```toml
54+
cargo-features = ["strip"]
55+
56+
[profile.release]
57+
strip = true # Automatically strip symbols from the binary.
5358
```
5459

5560
# Optimize For Size

0 commit comments

Comments
 (0)