-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Make crate features no-op on incompatible targets #3466
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
Conversation
@grovesNL if you could take a look and see if and how you are affected by this. |
e8bcf00
to
611c4ff
Compare
What exactly is the point of the |
Nice! I thought there was some reason we weren't able to set it up this way originally (maybe @kvark remembers?). Obviously it makes the
That sounds right - if we don't need a separate feature to conditionally enable it then I think could be replaced by |
I will do this in a separate PR. |
Shouldn't it also fix metal?
I think so. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the PR!
We seemed to be moving in this direction already, some cfg
s had the target_os
(ex windows
for dx11
/dx12
) and also had some dependencies gated by target_os
.
This is also more in line with the notion that feature flags should be additive and not cause compilation errors.
Could you remove |
As far as I am aware it will not, currently
Will do. |
9010c76
to
ba08bec
Compare
I can't remove So either we remove I tested my assumption in #3488, looks like it works. |
ba08bec
to
15af157
Compare
Let's make the PRs dependent, emscripten should go in soon. |
15af157
to
b9e00ff
Compare
Done! |
8147fcd
to
bea7960
Compare
This is ready now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome to finally have!
Does this mean https://github.com/gfx-rs/wgpu/blob/master/wgpu/Cargo.toml#L106-L109 we can enable all features on all platforms?
Yes! EDIT: |
I was just going through the CI again and I think we might want to test for |
Let's fix CI in this PR - it's all entangled |
ba0b500
to
645ecec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments, but looking good
bc1d0b1
to
44d11a0
Compare
bf3f7dc
to
e917f74
Compare
e917f74
to
7465b31
Compare
This changes crate features to be no-op on incompatible targets instead of not compiling.
As far as I'm aware Vulkan is needed on MacOS for Vulkan Portability.
I saw a feature called
portable_features
that is used for testing purposes. I believe I can actually remove this now?Depends on #3467.Fixes #3463 (only WASM).
Fixes #3465.