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.
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; |
| /// [skip]: super::TestParameters::skip | ||
| /// [expect_fail]: super::TestParameters::expect_fail | ||
| /// [`AdapterInfo`]: wgt::AdapterInfo | ||
| /// [`AdapterInfo`]: wgpu::AdapterInfo |
There was a problem hiding this comment.
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.
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.
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.
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.
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.
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.
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.