Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace vello's default wgpu feature with an optional wgpu feature #10

Merged
merged 1 commit into from
May 5, 2024

Conversation

MarijnS95
Copy link
Contributor

@MarijnS95 MarijnS95 commented Apr 29, 2024

linebender/vello#359 made wgpu an optional but default dependency/feature, but any crate using vello_svg will be forced to opt in to wgpu due to not disabling the default here.

Since vello_svg does not need any rendering backend at all, this feature should be disabled by default. As the vello crate is reexported from the root, a vello-wgpu passthrough feature is provided so that users can turn it back on without explicitly depending on vello in their crate dependencies.

Same change as linebender/velato#17.

@simbleau
Copy link
Member

Can you explain why we wouldn't want the default feature for wgpu?

@MarijnS95
Copy link
Contributor Author

So that crates using vello with their own rendering backend - without wgpu - can use the SVG implementation provided here, without pulling that dependency in? Same reasoning as linebender/vello#359 that did it for the vello crate.

@simbleau
Copy link
Member

So that crates using vello with their own rendering backend - without wgpu - can use the SVG implementation provided here, without pulling that dependency in? Same reasoning as linebender/vello#359 that did it for the vello crate.

Ah, I see.

We actually don't need the wgpu feature at all, I think. Since this crate only renders a Scene. This makes sense to me then.

@simbleau
Copy link
Member

Please update the CHANGELOG in turn and I can approve this. Thanks!

@MarijnS95
Copy link
Contributor Author

We actually don't need the wgpu feature at all, I think. Since this crate only renders a Scene. This makes sense to me then.

Yes, I could have spent a few more words explaining that vello_svg (and velato for the other PR) don't expose/use any of the render-backend specific implementation.


Before pushing an updated changelog: since this crate reexports vello from the root, does it make sense to forward the wgpu feature by adding wgpu = ["vello/wgpu"]?

@simbleau
Copy link
Member

Yeah, let's do that.

@MarijnS95 MarijnS95 force-pushed the vello-no-default branch 2 times, most recently from 4f23ebe to 28fe7c4 Compare May 3, 2024 09:28
@MarijnS95 MarijnS95 changed the title Disable default features on vello to remove wgpu Replace vello's default wgpu feature with an optional vello-wgpu feature May 3, 2024
@MarijnS95
Copy link
Contributor Author

@simbleau done.

Cargo.toml Outdated Show resolved Hide resolved
Copy link
Member

@simbleau simbleau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change that feature name to just wgpu.

CHANGELOG.md Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
…ature

linebender/vello#359 made `wgpu` an optional
but default dependency/feature, but any crate using `vello_svg` will be
forced to opt in to `wgpu` due to not disabling the default here.

Since `vello_svg` does not need any rendering backend at all, this
feature should be disabled by default.  As the `vello` crate is
reexported from the root, a `wgpu` passthrough feature is provided so
that users can turn it back on without explicitly depending on `vello`
in their crate dependencies.
@simbleau
Copy link
Member

simbleau commented May 5, 2024

Thanks!

@simbleau simbleau added this pull request to the merge queue May 5, 2024
@simbleau simbleau removed this pull request from the merge queue due to a manual request May 5, 2024
@simbleau simbleau changed the title Replace vello's default wgpu feature with an optional vello-wgpu feature Replace vello's default wgpu feature with an optional wgpu feature May 5, 2024
@simbleau simbleau added this pull request to the merge queue May 5, 2024
Merged via the queue into linebender:main with commit cce78da May 5, 2024
9 checks passed
@MarijnS95 MarijnS95 deleted the vello-no-default branch May 5, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants