-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Split up features. #6905
Split up features. #6905
Conversation
The diff that the entire thing has made is slightly confusing, I would recommend reading it separately (or at least |
…ures-main # Conflicts: # wgpu-types/src/lib.rs
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.
Took a look for a pre-review; looks nice and not as bad, especially if we add some more docs.
# Conflicts: # wgpu-types/src/lib.rs
Would be interesting to run cargo-semver-checks against this change, might catch any subtleties missed |
one thing I forgot to do so far is to look at the rustdoc output: We need to make sure that this is all still sane and shows the right things. |
I could also not re-export wgpu/webgpu features structs to make users have to use |
Why not just call |
No real reason, it was just the name I came up with first. I can call it that if you think it's more clearer though. |
I actually prefer |
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.
thanks for incorporating those improvements. All good to go!
Right now the new features structs aren't exposed through wgpu, I have some experiments locally of what that could look like. I'll create a separate PR for those and ping you on that :)
(alongside with some formatting nits that weren't worth the hold-up - would have pushed to this PR, but for some reason push to PR doesn't work again today, feels kinda random when it does 🙄 )
Said follow-up suggestion here |
Splits up features into wgpu & webgpu features.
Connections
Fixes #5247 as this can be infinitely extended (or at least until the stack is exhausted).
Description
Creates an extendable way to use sets of bitflags together. This then splits up features into two subpart: FeaturesWGPU and FeaturesWebGPU. These can be further extended or split if that is needed (e.g shader features vs other features). This is ready for review, tell me if this is the wrong path. I'm quite new to macros (this is probably my second), so tell me if I've missed a helpful feature.
Implementation
Internally this uses a struct as that was the easiest to interact with extendable macros (though externally this interacts with arrays). I think it wouldn't be too hard to switch everything to arrays, but I think it might be slightly messier.
Testing
All existing tests should cover this
Implemented
const
FunctionsChecklist
cargo fmt
.taplo format
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.