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

Do a little feature magic to allow to build for web #83

Merged
merged 4 commits into from
Feb 22, 2024

Conversation

Jengamon
Copy link
Contributor

@Jengamon Jengamon commented Feb 7, 2024

This change will allow people who want to build this crate for web (especially today) to do so, by allowing them to
transitively turn off the default wgpu features.

Turning it back on would be this crate's default feature, so current consumers wouldn't have to change anything, but
people who want web now can now do:

[dependencies]
# ... really cool deps ...
glyphon = { version = "0.5.0-whatever", default-features = false }
wgpu = { version = "0.19.1-cool-beans", default-features = false, features = ["webgl"] }

Maybe web support. Maybe?????
Copy link
Owner

@grovesNL grovesNL left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

Could we still enable the wgpu default features for the example somehow, so it does the WebGPU/WebGL fallback when building for wasm?

Cargo.toml Outdated Show resolved Hide resolved
@grovesNL
Copy link
Owner

It looks like we still need the wgsl feature enabled unconditionally for the regular dependency

@grovesNL grovesNL merged commit 4700e54 into grovesNL:main Feb 22, 2024
1 check passed
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.

2 participants