Skip to content

Commit 8ad7ea0

Browse files
authored
build(jetsocat,dgw): optimize binary size (#1489)
Size was already optimized in the past by enabling lto and stripping the debug symbols. Adding codegen-units = 1 brings the binary size further down. - Jetsocat baseline: 7.3M - Jetsocat after: 6.6M - Devolutions Gateway baseline: 27M - Devolutions Gateway after: 25M
1 parent 9ddf10c commit 8ad7ea0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ debug = 1
2929

3030
[profile.production]
3131
inherits = "release"
32-
lto = true
3332
strip = "symbols"
33+
codegen-units = 1
34+
lto = true
3435

3536
[patch.crates-io]
3637
tracing-appender = { git = "https://github.com/CBenoit/tracing.git", rev = "42097daf92e683cf18da7639ddccb056721a796c" }

0 commit comments

Comments
 (0)