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:
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.
- 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.
- 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.
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
xilemormasonryto benefit from this they would need to introduce a possibly similar mechanism to opt out ofvello's default features, which default to enablingwgpu's defaults.I'm wondering what the most ergonomic design for users and crate maintainability would be. I imagine three possible scenarios:
xilemandmasonryboth 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 onvello/wgpuis desireble.xilemandmasonry. Semantically very similar to (1.) but there is no need to introduce new feature flags inxilemandmasonry.wgpu's defaults at all and document for the users very explicitly that they are responsible for enabling the right features forwgpuvia awgpudependency 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 onwgpuwould have to introduce but puts the whole responsibility on the users. I think for library crates depending onwgputhis should be the default way to go when well documented.I guess this needs further consideration.