Skip to content

Commit

Permalink
Merge pull request #139 from Milo123459/milo/op
Browse files Browse the repository at this point in the history
Add LTO and other things to release profile
  • Loading branch information
HardhatChad authored Aug 22, 2024
2 parents 420c023 + b3f7690 commit 3954f5a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,15 @@ serde = { version = "1.0", features = ["derive"] }
# ore-api = { path = "../ore/api" }
# ore-utils = { path = "../ore/utils" }

[profile.release]
opt-level = 3 # Optimize for binary size. You can use "3" for full optimizations if binary size isn't an issue.
codegen-units = 1 # Better optimization with fewer codegen units
lto = true # Enable Link Time Optimization (LTO)
debug = false # Disable debug info to reduce binary size
panic = 'abort' # Reduces the binary size further by not including unwinding information
rpath = false
incremental = false
overflow-checks = false

[build]
rustflags = ["-C", "target-cpu=native"]

0 comments on commit 3954f5a

Please sign in to comment.