From 2fbbd55d139b80699e548bc1014aeef2c714bdbc Mon Sep 17 00:00:00 2001 From: clover caruso Date: Sat, 3 Oct 2026 14:24:26 -0700 Subject: [PATCH] chore: release builds optimise for size the crates that run at a person's pace System services, the network, file and image formats and shader translation build at opt-level "s"; the page, the renderer, the font stack, wgpu and SQLite stay at 3. Release executables after the debug split: Linux x86_64 48.45 to 47.08 MB (-1.38), macOS aarch64 34.49 to 34.17 MB (-0.32), Windows x86_64 38.62 to 37.28 MB (-1.34, with the previous commit). Assisted-by: claude-opus-5.5 --- Cargo.toml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 4f57c9def534e297aaefd672b0a61311cd1169cb..439ed720b7835de6cef38536bf1bb861a0b244fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,56 @@ sctk-adwaita = { path = "vendor/sctk-adwaita" } lto = "fat" codegen-units = 1 +# Code that runs at a person's pace, not a frame's: system services, the network, file and +# image formats, shader translation. +[profile.release.package] +accesskit.opt-level = "s" +accesskit_atspi_common.opt-level = "s" +accesskit_consumer.opt-level = "s" +accesskit_macos.opt-level = "s" +accesskit_unix.opt-level = "s" +accesskit_windows.opt-level = "s" +accesskit_winit.opt-level = "s" +async-executor.opt-level = "s" +async-io.opt-level = "s" +atspi.opt-level = "s" +atspi-common.opt-level = "s" +atspi-proxies.opt-level = "s" +cab.opt-level = "s" +gif.opt-level = "s" +image.opt-level = "s" +lzxd.opt-level = "s" +mdns-sd.opt-level = "s" +naga.opt-level = "s" +pdf-writer.opt-level = "s" +png.opt-level = "s" +quick-xml.opt-level = "s" +ring.opt-level = "s" +roxmltree.opt-level = "s" +rustls.opt-level = "s" +rustls-webpki.opt-level = "s" +serde_json.opt-level = "s" +smb2.opt-level = "s" +smithay-client-toolkit.opt-level = "s" +subsetter.opt-level = "s" +svgtypes.opt-level = "s" +tiff.opt-level = "s" +tokio.opt-level = "s" +toml_edit.opt-level = "s" +unicode_names2.opt-level = "s" +ureq.opt-level = "s" +ureq-proto.opt-level = "s" +usvg.opt-level = "s" +wayland-client.opt-level = "s" +winit.opt-level = "s" +x11rb.opt-level = "s" +x11rb-protocol.opt-level = "s" +zbus.opt-level = "s" +zbus_names.opt-level = "s" +zbus_xml.opt-level = "s" +zune-jpeg.opt-level = "s" +zvariant.opt-level = "s" + # Shaping, rasterization and GPU submission stay optimised in debug builds, where # unoptimised dependencies alone drop frames. [profile.dev.package."*"] -- 2.54.0