Skip to content

Commit

Permalink
feat: reduce executable size
Browse files Browse the repository at this point in the history
# Slim executables

```toml
[profile.release]
strip = true
opt-level = "z"
codegen-units = 1
lto = true
```

## References
- https://doc.rust-lang.org/stable/rustc/codegen-options/
- https://doc.rust-lang.org/rustc/profile-guided-optimization.html
- https://github.com/johnthagen/min-sized-rust
  • Loading branch information
YOU54F committed Apr 30, 2024
1 parent 99cdd58 commit 652fbd4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,8 @@ trim-margin = "0.1.0"
built = { version = "0.7.2", features = [ "git2" ] }
os_info = "3.8.2"

[profile.release]
strip = true
opt-level = "z"
codegen-units = 1
lto = true

0 comments on commit 652fbd4

Please sign in to comment.