-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Refactor Cargo.toml Significantly #6980
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
Refactor Cargo.toml Significantly #6980
Conversation
6dca5bb to
3240917
Compare
3240917 to
bc98515
Compare
| RUSTDOCFLAGS: -D warnings | ||
| WASM_BINDGEN_TEST_TIMEOUT: 300 # 5 minutes | ||
| CACHE_SUFFIX: c # cache busting | ||
| CACHE_SUFFIX: d # cache busting |
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.
Not strictly necessary, but I thought I had a cache bug, and it doesn't hurt to make sure the caches are clear every once and again
| extern crate wgpu_core as wgc; | ||
| extern crate wgpu_types as wgt; |
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.
Lookie!
| /// [skip]: super::TestParameters::skip | ||
| /// [expect_fail]: super::TestParameters::expect_fail | ||
| /// [`AdapterInfo`]: wgt::AdapterInfo | ||
| /// [`AdapterInfo`]: wgpu::AdapterInfo |
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.
We constantly used wgt in tests when we shouldn't have.
| [lints.rust] | ||
| unexpected_cfgs = { level = "warn", check-cfg = ['cfg(web_sys_unstable_apis)'] } | ||
|
|
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.
Moved all the lints to be in the same order
| adapter: A::Adapter, | ||
| surface: A::Surface, | ||
| surface_format: wgt::TextureFormat, | ||
| surface_format: wgpu_types::TextureFormat, |
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.
Changed these because these are supposed to be examples.
| spirv = ["naga/spv-in", "wgpu-core?/spirv"] | ||
|
|
||
| ## Enable accepting GLSL shaders as input. | ||
| glsl = ["naga/glsl-in", "wgc/glsl"] | ||
| glsl = ["naga/glsl-in", "wgpu-core?/glsl"] |
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.
subtle: we dropped a ? here, and previously would always get wgpu-core even if webgl wasn't enabled.
| ######################################## | ||
| # Target Specific Feature Dependencies # | ||
| ######################################## |
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 section was recast such that instead of trying to get exact right combination of targets for each feature, we just list out the target categories and list out each feature. This is soooo much more clear.
| #[cfg_attr(docsrs, doc(cfg(any(wgpu_core, naga))))] | ||
| #[cfg(any(wgpu_core, naga))] |
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 was wrong, but wasn't caught until some of the cfgs were fixed up.
bc98515 to
184c51d
Compare
|
@cwfitzgerald Does this change the names of the wgpu features people need to select to get, say wgpu_core? If so, then we need a CHANGELOG.md note about this. |
jimblandy
left a comment
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.
Everything outside of deno_webgpu looks good to me, except as noted. The wgpu_hal/Cargo.toml changes are especially nice.
Sorry this bad boy got a bit out of control, but I think puts us in a much better place than we were before.
Step 1 towards #6975
Cargo.tomlcrate renames withextern craterenames at the top of the relevant libraries.wgpu/Cargo.tomlandwgpu-hal/Cargo.tomland adds a variety of comments.wgtin examples and tests.