-
Notifications
You must be signed in to change notification settings - Fork 968
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
base: trunk
Are you sure you want to change the base?
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 |
Is that to catch changes to functions? If so it's probably better than my manual check. Edit: you would have to ignore all the things about bit changes as their size (and type) has changed. |
Yeah, just as a point of information, not a "blocker" kind of thing |
If you have it then could you run it? Otherwise, I'm fine to install it and see what it tells me. |
Semver-checks seems to think everything is fine. I also removed one of the functions out of the macro and it noticed so it's not just missed it. |
Connections
I guess would fix #5247 as it should be extendable and uses `#[repr(C)] and so should support cbindgen.
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
(Though docs - in CI is grouped together - doesn't like this). If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.