From 4b6de20b678fbe1bc1d1422e36100162db061b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Doubravsk=C3=BD?= Date: Sat, 17 Oct 2026 14:24:07 +0200 Subject: [PATCH] Shrink the release binary with a size-optimised profile and the glow renderer --- CHANGELOG.md | 12 ++++++++ Cargo.lock | 83 +--------------------------------------------------- Cargo.toml | 9 +++++- 3 files changed, 21 insertions(+), 83 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33218a9..07c5529 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,18 @@ Each version entry uses these sections (include only those that apply): - Always update this file before bumping the version in `Cargo.toml` - Document changes as they are made, not all at once at release time +## Unreleased + +### Changed +- **The release binary is 2.5× smaller** (`curator` 42.7 → 17 MB, `tipy-dne` + 6 → 1.8 MB): the release profile strips debug symbols, uses LTO with a single + codegen unit and optimises for size (`opt-level = "s"`), and the GUI renders + through OpenGL (`glow`) instead of `wgpu`. + +### Dependencies +- `eframe` with the `glow` renderer only (default features off; `wgpu` and the + web screen-reader feature dropped). + ## 2.0.0 — 2026-10-17 ### Changed diff --git a/Cargo.lock b/Cargo.lock index bb0d519..efe944a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,22 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "ab_glyph" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c0457472c38ea5bd1c3b5ada5e368271cb550be7a4ca4a0b4634e9913f6cc2" -dependencies = [ - "ab_glyph_rasterizer", - "owned_ttf_parser", -] - -[[package]] -name = "ab_glyph_rasterizer" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" - [[package]] name = "accesskit" version = "0.25.1" @@ -221,12 +205,6 @@ dependencies = [ "x11rb", ] -[[package]] -name = "arrayref" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" - [[package]] name = "arrayvec" version = "0.7.8" @@ -1128,6 +1106,7 @@ dependencies = [ "egui-winit", "egui_glow", "egui_system_font_provider", + "glow", "glutin", "glutin-winit", "image", @@ -3095,15 +3074,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "owned_ttf_parser" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" -dependencies = [ - "ttf-parser", -] - [[package]] name = "parking" version = "2.2.1" @@ -4039,19 +4009,6 @@ dependencies = [ "tendril", ] -[[package]] -name = "sctk-adwaita" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" -dependencies = [ - "ab_glyph", - "log", - "memmap2", - "smithay-client-toolkit 0.19.2", - "tiny-skia", -] - [[package]] name = "security-framework" version = "3.7.0" @@ -4396,12 +4353,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "strict-num" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" - [[package]] name = "string_cache" version = "0.9.0" @@ -4628,31 +4579,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tiny-skia" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" -dependencies = [ - "arrayref", - "arrayvec", - "bytemuck", - "cfg-if", - "log", - "tiny-skia-path", -] - -[[package]] -name = "tiny-skia-path" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" -dependencies = [ - "arrayref", - "bytemuck", - "strict-num", -] - [[package]] name = "tinystr" version = "0.8.4" @@ -4874,12 +4800,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "ttf-parser" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" - [[package]] name = "type-map" version = "0.5.1" @@ -5832,7 +5752,6 @@ dependencies = [ "raw-window-handle", "redox_syscall 0.4.1", "rustix 0.38.44", - "sctk-adwaita", "smithay-client-toolkit 0.19.2", "smol_str", "tracing", diff --git a/Cargo.toml b/Cargo.toml index c089c8a..faa0e9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ anyhow = "1.0.104" chrono = "0.4.45" dirs = "7.0.0" dotenvy = "0.15.7" -eframe = "0.37.0" +eframe = { version = "0.37.0", default-features = false, features = ["accesskit", "clipboard", "default_fonts", "links", "system_fonts", "wayland", "x11", "glow"] } ego-tree = "0.11.0" egui = "0.37.0" egui_extras = "0.37.0" @@ -35,3 +35,10 @@ url = "2.5.8" [dev-dependencies] egui_kittest = { version = "0.37.0", features = ["eframe", "wgpu", "snapshot"] } tempfile = "3.27.0" + +[profile.release] +# smaller binary: no debug symbols, whole-program optimisation +strip = true +lto = true +codegen-units = 1 +opt-level = "s"