Skip to content

Tracking Desired Rust & Cargo Upstream Features #7420

@ogoffart

Description

@ogoffart

This issue serves as a tracker for features and improvements we would like to see in Rust, Cargo, and related tools that would benefit Slint. It is meant to be updated and edited over time.

Features We Wish to See in Rust:

Features We Wish to See in Cargo:

  • Improved communication between runtime and code generation crates:

    • We'd like better mechanisms to communicate features from the "runtime" crate to code generation crates (e.g., slint-macro or slint-build).
    • This would allow us to surface relevant errors when required features are not enabled (e.g., detecting if Qt is available for backend-qt).
    • Currently, we rely on hacks like the SLINT_DEFAULT_STYLE.txt, which is unreliable.
  • Feature flags based on system dependencies:

    • build.rs currently cannot influence features. It would be useful to enable or disable features based on detected system dependencies (e.g., disabling the backend-winit crate if Qt is found on the system).
    • A configure.rs-like system would address this need.
  • Simpler disabling of individual default features Ability to disable individual default features rust-lang/cargo#3126:
    An easier mechanism to selectively disable default features would help as we have many default features and they need to be repeated in each depending crates.

  • Unstable features stable/unstable/nightly-only features rust-lang/cargo#10881:
    For experimental features and so we can expose crates that don't have the same stability as us in the public API (eg: winit, wgpu)

In cargo-semver-check:

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamNeeds a fix upstream

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions