Skip to content

Allowing users of Xilem and Masonry to opt out of wgpu's default features #1395

Description

@StT191

Vello just recently added the ability for crate users to opt out of wgpu's default features (via PR #1229).

In order for users of xilem or masonry to benefit from this they would need to introduce a possibly similar mechanism to opt out of vello's default features, which default to enabling wgpu's defaults.

I'm wondering what the most ergonomic design for users and crate maintainability would be. I imagine three possible scenarios:

  1. xilem and masonry both introduce a new feature "wgpu_default" or "vello_default" that will be enabled by default. I'm not however convinced transitively adding a "wgpu_default" feature to all the crates that depend on vello/wgpu is desireble.
  2. Just add "vello/wgpu_default" as a default feature in xilem and masonry. Semantically very similar to (1.) but there is no need to introduce new feature flags in xilem and masonry.
  3. Introduce a hard breaking change: Don't enable wgpu's defaults at all and document for the users very explicitly that they are responsible for enabling the right features for wgpu via a wgpu dependency in Cargo.toml, namely what backends wgpu compiles with and whether to enable the recommended default feature "parking_lot". Going with such a default would minimize the feature flags that crates depending on wgpu would have to introduce but puts the whole responsibility on the users. I think for library crates depending on wgpu this should be the default way to go when well documented.

I guess this needs further consideration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions