Skip to content

Commit

Permalink
Merge pull request #40 from flatcar/kai/release-profile
Browse files Browse the repository at this point in the history
Cargo.toml: Add release profile for smaller size and overflow checks
  • Loading branch information
pothos authored Dec 5, 2023
2 parents b6b48fe + 5a94b6c commit 2c58396
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,14 @@ members = [
[[bin]]
name = "crau_verify"
path = "test/crau_verify.rs"

[profile.release]
# We do some offset calculations for extraction and
# the generated protobuf code does even more, let's
# be cautious
overflow-checks = true
# Reduce binary size by stripping debug symbols
strip = true
# Reduce binary size by using one codegen unit for similar gains as thin LTO
# (which we had problem with when cross-compiling)
codegen-units = 1

0 comments on commit 2c58396

Please sign in to comment.