yoda: drop x11 defaults on iced_winit + iced_tiny_skia

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.
This commit is contained in:
Lionel DARNIS 2026-04-24 06:00:03 +02:00
parent 8ab7b15807
commit 8d1d873918

View file

@ -226,10 +226,17 @@ optional = true
[dependencies.iced_tiny_skia] [dependencies.iced_tiny_skia]
path = "./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] [dependencies.iced_winit]
path = "./iced/winit" path = "./iced/winit"
optional = true 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] [dependencies.iced_wgpu]
path = "./iced/wgpu" path = "./iced/wgpu"