Skip to content

Commit 42b61b1

Browse files
committed
Further optimise release speed by using the defaults
Also: optimise for size explicitly. Note that we don't add debug info as this can blow up compile time to 1h40m on some platform, Linux if memory serves.
1 parent 73d0468 commit 42b61b1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/publish.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ jobs:
197197
run: |
198198
echo "CARGO_PROFILE_RELEASE_LTO=fat" >> $GITHUB_ENV
199199
echo "CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1" >> $GITHUB_ENV
200+
echo "CARGO_PROFILE_RELEASE_OPT_LEVEL=s" >> $GITHUB_ENV
200201
- name: Build binary
201202
shell: bash
202203
run: |

Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ rmcp = { version = "0.1.5" }
101101
serde_json_lenient = "0.2.3"
102102

103103
[profile.release]
104-
lto = "thin" # Enables link to optimizations, but don't go all out on compile time.
105-
opt-level = "s" # Optimize for binary size
104+
# There are no overrides here as we optimise for fast release builds,
105+
# which are used when building locally and when making Nightly builds.
106+
# The Stable release builds override the relevant settings at release time
107+
# to optimise for size.
106108

107109
[profile.bench]
108110
codegen-units = 256

0 commit comments

Comments
 (0)