From 8d1d873918d8cf863ec4da9af985807092d15b32 Mon Sep 17 00:00:00 2001 From: leyoda Date: Fri, 24 Apr 2026 06:00:03 +0200 Subject: [PATCH] yoda: drop x11 defaults on iced_winit + iced_tiny_skia MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dep chain audit showed winit, iced_winit and iced_tiny_skia all had "x11" in their default features. Even though our Wayland-only build doesn't use any X11 code path, the defaults were propagating through cargo feature unification — winit-x11, tiny-xlib, x11-dl, etc. were all being linked. Fix, at the dep declaration level: - [dependencies.iced_winit] default-features = false + wayland/wayland-dlopen - [dependencies.iced_tiny_skia] default-features = false + wayland - iced submodule's workspace winit = { ..., default-features = false } Result on cosmic-yoterm binary: - size: 55.4 MB -> 53.8 MB (-1.6 MB, ~3%) - winit symbols: 2151 -> 1340 (-811) - x11 symbols: 1526 -> 503 (-1023) Remaining x11 footprint (~500 symbols): - clipboard_x11 / x11rb: window_clipboard pulls both x11 + wayland backends unconditionally on unix targets. Would need forking window_clipboard to gate x11 behind a feature. - tiny-xlib / as-raw-xcb-connection: low-level window-handle bindings pulled by wgpu/softbuffer even when no X11 windows ever exist. Dead code at runtime, probably best left alone until wgpu/raw-window-handle upstream make these optional. --- Cargo.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index a5707e2..2f38df6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -226,10 +226,17 @@ optional = true [dependencies.iced_tiny_skia] path = "./iced/tiny_skia" +# Yoda: drop the x11 default → softbuffer no longer pulls tiny-xlib/x11-dl/etc. +default-features = false +features = ["wayland"] [dependencies.iced_winit] path = "./iced/winit" optional = true +# Yoda: drop the x11 default → winit won't pull winit-x11/tiny-xlib/x11-dl. +# Keep wayland + wayland-dlopen (default behaviour minus x11). +default-features = false +features = ["wayland", "wayland-dlopen"] [dependencies.iced_wgpu] path = "./iced/wgpu"