Skip to content

Commit 9c5e197

Browse files
committed
Enable link-time optimization when building Rust library in release mode
This decreases the compiled library size and improves performance. codegen-units is also set to 1 to further optimize the compiled library.
1 parent 25c5a74 commit 9c5e197

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rust/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ version = "1.0.0"
1010
[lib]
1111
crate-type = ["cdylib"]
1212

13+
[profile.release]
14+
lto = true
15+
codegen-units = 1
16+
1317
[dependencies]
1418
anyhow = "1.0.38"
1519
approx = "0.4.0"

0 commit comments

Comments
 (0)