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 26, 2024
1 parent ee3f7ad commit 18dbf5c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,14 @@ tempfile = "3.8.1"
expectest = "0.12.0"
test-log = "0.2.14"
env_logger = "0.10.1"

[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
12 changes: 12 additions & 0 deletions plugins/csv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,15 @@ itertools = "0.12.0"

[build-dependencies]
tonic-build = "0.10.2"


[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

0 comments on commit 18dbf5c

Please sign in to comment.