Skip to content

i-slint-backend-winit uses accesskit_winit with default features #9861

@Evrey

Description

@Evrey

Bug Description

I do not support X11 in my app, so i intend to also purge all X11-related dependencies. To my surprise, while moving my dev env into a container with no X11 support, the app no longer runs, failing to link against unnamed X11 libs.

cargo tree pointed me at i-slint-backend-winit as the potential culprit:

│   │   │   ├── i-slint-backend-winit feature "default"
│   │   │   │   └── i-slint-backend-winit v1.14.1
│   │   │   │       ├── accesskit_winit feature "default"
│   │   │   │       │   ├── accesskit_winit v0.29.2
│   │   │   │       │   └── winit feature "x11"

… and while i-slint-backend-winit’s default feature says nothing of X11 or Wayland, this is from the 1.14.1 Cargo.toml:

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
accesskit = { version = "0.21", optional = true }
accesskit_winit = { version = "0.29", optional = true } # No disable default features

Here’s my current Cargo.toml for pulling in Slint:

[features]
default       = [ "accessibility" ]
accessibility = [ "slint/accessibility" ]

[dependencies.slint]
version          = "1.14"
default-features = false
features         = [
  "compat-1-2",
  "gettext",
]
[target.'cfg(target_os = "linux")'.dependencies.slint]
version          = "*"
default-features = false
features         = [
  "backend-qt",
  "backend-winit-wayland",
  "renderer-femtovg",
]

When i disable the accessibility feature, then as expected, X11 is no longer pulled in.

Reproducible Code (if applicable)

1. Disable default features for Slint
2. Enable the features `accessibility,backend-winit-wayland`
3. Run a trivial Slint app in a Wayland-only environment
4. See errors on failing to load X11 libs at runtime

Environment Details

  • Slint Version: 1.14.1
  • Platform/OS: Linux/Wayland
  • Programming Language: Rust
  • Backend/Renderer: backend-winit-wayland

Product Impact

X11 is a huge amount of legacy cruft i do not wish to bother supporting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:accessibilitySupport for assistive technologies (mS,bT)a:backend-winitWinit backend (mS,mO)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions