You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compiler has some parallelism by default to speedup compilation, you can configure the release profile to compile as a single unit
@@ -75,6 +73,8 @@ release = [
75
73
opt-level = "z"# instruct the compiler to optimize for size
76
74
```
77
75
76
+
Note that the [`zng-template`] already setups something like this, you just need to fill in the release features on each crate and call `cargo do build-r -z`.
77
+
78
78
### Nightly
79
79
80
80
If your project safety constraints allows the nightly compiler and an unstable feature you can enable `-Zshare-generics` to reduce size even more:
@@ -94,4 +94,8 @@ In the command line example above the `RUSTFLAGS` is set to enable the `share-ge
94
94
95
95
The example also sets the `-C link-args=-znostart-stop-gc`, this is to workaround a nightly only linker issue that affects a dependency of `zng`. Note
96
96
that every nightly release can cause all kinds of issues and the `zng` project is only officially supported on the latest stable Rust release. This
97
-
optimization was tested on the `2025-01-08` nightly release.
97
+
optimization was tested on the `2025-01-08` nightly release.
98
+
99
+
The [`zng-template`] already setups something like this, call `cargo do build -r -z --bleed` to compile with nightly optimizations.
0 commit comments