Skip to content

Commit

Permalink
Clean up build profiles. Turn on Link-Time-Optimization (LTO).
Browse files Browse the repository at this point in the history
LTO with codegen-units as 1 produces a faster binary.

Also removed some options that are default for release mode, such as
'debug' and 'debug-assertions'.

Issue #114
  • Loading branch information
david-cattermole committed Dec 29, 2021
1 parent 87b2b02 commit c797d8b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/mmscenegraph/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,12 @@ criterion = "0.3.3"

[profile.release]
opt-level = 3
debug = false
rpath = false
lto = false
# 'lto = true' Performs "fat" LTO which attempts to perform
# optimizations across all crates within the dependency graph.
lto = true
# NOTE: If we use 'panic = "abort"' then we are unable to produce tests.
# # https://github.com/rust-lang/cargo/issues/6313
#
# panic = "abort"
debug-assertions = false

[profile.bench]
lto = true
codegen-units = 1

0 comments on commit c797d8b

Please sign in to comment.