diff --git a/.config/nextest.toml b/.config/nextest.toml index 574ad1b37..b83fffafa 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -6,10 +6,6 @@ slow-timeout = { period = "45s", terminate-after = 2 } fail-fast = false retries = 0 -[profile.default-miri] -# Miri is very very slow, so give it a much longer timeout. -slow-timeout = { period = "120s", terminate-after = 4 } - # Use two threads for tests with "2 threads" in their name [[profile.default.overrides]] filter = 'test(~2_threads) | test(~2 threads)' @@ -51,3 +47,7 @@ threads-required = "num-test-threads" [[profile.default.overrides]] priority = 1 filter = 'test(clear_texture) | test(clear_buffer_range_respected) | test(compile_fail) | test(test_api)' + +[profile.default-miri] +# Miri is very very slow, so give it a much longer timeout. +slow-timeout = { period = "120s", terminate-after = 4 } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 075cf9059..39e811a19 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -829,13 +829,13 @@ jobs: run: | cargo --locked fmt -- --check - - name: Install Taplo - uses: uncenter/setup-taplo@v2 + - name: Install Tombi + uses: tombi-toml/setup-tombi@v1.1.3 with: - version: "0.9.3" + version: "1.1.3" - - name: Run `taplo fmt` - run: taplo format --check --diff + - name: Format TOML files + run: tombi format --check --diff - name: Check for typos uses: crate-ci/typos@v1.47.2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e39f8e80..593615066 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -270,6 +270,10 @@ By @beholdnec in [#8505](https://github.com/gfx-rs/wgpu/pull/8505). - Upgrade vendored `wasm-bindgen` WebGPU bindings to 0.2.115 and adapt the `webgpu` backend to the new API. `ExternalImageSource::VideoFrame` no longer requires `--cfg=web_sys_unstable_apis`, as `web_sys::VideoFrame` is now stable. The GLES backend still requires the cfg to upload `VideoFrame`s, since `glow` still needs to adapt. By @evilpie in [#9090](https://github.com/gfx-rs/wgpu/pull/9090). +### Testing/Internal + +- We now use `tombi` as our TOML formatter instead of `taplo`, which has been unmaintained for some time. If you currently use `taplo` as part of your workflow, we recommend you migrate, or change your editor settings while working with wgpu. + ## v29.0.1 (2026-03-26) This release includes `wgpu-core`, `wgpu-hal` and `wgpu-types` version `29.0.1`. All other crates remain at their previous versions. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7f3576929..5dafa98ec 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -106,7 +106,7 @@ We use the following components in a wgpu development environment: [`rust-toolchain.toml`](./rust-toolchain.toml), to compile wgpu's code. If you use `rustup`, this will be automatically installed when you first run a `cargo` command in the repository. -- [Taplo](https://taplo.tamasfe.dev/) to keep TOML files formatted. +- [Tombi](https://tombi-toml.github.io/tombi/) to keep TOML files formatted. - [Vulkan SDK](https://vulkan.lunarg.com/) to provide Vulkan validation layers and other Vulkan/SPIR-V tools for testing. diff --git a/examples/standalone/01_hello_compute/cargo-generate.toml b/examples/standalone/01_hello_compute/cargo-generate.toml index 8b1378917..e69de29bb 100644 --- a/examples/standalone/01_hello_compute/cargo-generate.toml +++ b/examples/standalone/01_hello_compute/cargo-generate.toml @@ -1 +0,0 @@ - diff --git a/naga-test/Cargo.toml b/naga-test/Cargo.toml index eec048986..d87a2b19a 100644 --- a/naga-test/Cargo.toml +++ b/naga-test/Cargo.toml @@ -11,7 +11,6 @@ license.workspace = true rust-version.workspace = true publish = false - [features] [dependencies] diff --git a/naga/tests/in/spv/gather-cmp.toml b/naga/tests/in/spv/gather-cmp.toml index c9c37b9d0..ca7a97c39 100644 --- a/naga/tests/in/spv/gather-cmp.toml +++ b/naga/tests/in/spv/gather-cmp.toml @@ -1,3 +1,2 @@ - [spv-in] adjust_coordinate_space = true diff --git a/naga/tests/in/spv/gather.toml b/naga/tests/in/spv/gather.toml index c9c37b9d0..ca7a97c39 100644 --- a/naga/tests/in/spv/gather.toml +++ b/naga/tests/in/spv/gather.toml @@ -1,3 +1,2 @@ - [spv-in] adjust_coordinate_space = true diff --git a/naga/tests/in/spv/load-ms-texture.toml b/naga/tests/in/spv/load-ms-texture.toml index c9c37b9d0..ca7a97c39 100644 --- a/naga/tests/in/spv/load-ms-texture.toml +++ b/naga/tests/in/spv/load-ms-texture.toml @@ -1,3 +1,2 @@ - [spv-in] adjust_coordinate_space = true diff --git a/naga/tests/in/wgsl/interface.toml b/naga/tests/in/wgsl/interface.toml index 422d1ae3f..55e10167b 100644 --- a/naga/tests/in/wgsl/interface.toml +++ b/naga/tests/in/wgsl/interface.toml @@ -1,5 +1,4 @@ -msl_pipeline = { allow_and_force_point_size = true, vertex_buffer_mappings = [ -], vertex_pulling_transform = false } +msl_pipeline = { allow_and_force_point_size = true, vertex_buffer_mappings = [], vertex_pulling_transform = false } targets = "SPIRV | METAL | HLSL | WGSL" wgsl = { explicit_types = true } diff --git a/naga/tests/in/wgsl/skybox.toml b/naga/tests/in/wgsl/skybox.toml index 37ba3b5d5..4401f1b4d 100644 --- a/naga/tests/in/wgsl/skybox.toml +++ b/naga/tests/in/wgsl/skybox.toml @@ -20,6 +20,7 @@ resources = [ { resource_binding = { group = 0, binding = 1 }, bind_target = { texture = 0 } }, { resource_binding = { group = 0, binding = 2 }, bind_target = { sampler.Inline = 0 } }, ] + [msl.per_entry_point_map.vs_main] resources = [ { resource_binding = { group = 0, binding = 0 }, bind_target = { buffer = 0 } }, diff --git a/rustfmt.toml b/rustfmt.toml index 8b1378917..e69de29bb 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1 +0,0 @@ - diff --git a/tombi.toml b/tombi.toml new file mode 100644 index 000000000..cf11fcff8 --- /dev/null +++ b/tombi.toml @@ -0,0 +1,24 @@ +toml-version = "v1.0.0" + +[format] +[format.rules] +indent-width = 4 +line-width = 120 +string-quote-style = "preserve" +trailing-comment-space-width = 1 + +# By default, `tombi` assumes TOML 1.1's features, particularly the ability to write inline tables over +# multiple lines. This breaks Cargo in Rust versions older than 1.93. +# +# See also: +# +# - https://github.com/zed-industries/zed/issues/58311 +# - https://github.com/tombi-toml/tombi/issues/1927#issuecomment-4580404934 +[[schemas]] +toml-version = "v1.0.0" +path = "tombi://www.schemastore.org/cargo.json" +include = ["Cargo.toml"] + +[schemas.format.rules] +array-values-order.enabled = false +table-keys-order.enabled = false diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index c1c34de20..d08594512 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -161,10 +161,13 @@ noop = [] # from getting confused by seeing them in the list of crates. [target.'cfg(target_vendor = "apple")'.dependencies] wgpu-core-deps-apple = { workspace = true, optional = true } + [target.'cfg(target_os = "emscripten")'.dependencies] wgpu-core-deps-emscripten = { workspace = true, optional = true } + [target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies] wgpu-core-deps-wasm = { workspace = true, optional = true } + [target.'cfg(any(windows, target_os = "linux", target_os = "android", target_os = "freebsd"))'.dependencies] wgpu-core-deps-windows-linux-android = { workspace = true, optional = true } diff --git a/wgpu-hal/Cargo.toml b/wgpu-hal/Cargo.toml index b5fa902c9..17f50a4bc 100644 --- a/wgpu-hal/Cargo.toml +++ b/wgpu-hal/Cargo.toml @@ -36,13 +36,12 @@ ignored = ["cfg_aliases"] [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = [ 'cfg(feature, values("cargo-clippy"))', # objc's `msg_send` macro injects this in our code https://github.com/SSheldon/rust-objc/issues/125 - 'cfg(web_sys_unstable_apis)', # web-sys uses this + 'cfg(web_sys_unstable_apis)', # web-sys uses this ] } [lib] [features] - ######################## ### Backend Features ### ######################## @@ -122,7 +121,7 @@ gles = [ "dep:windows-result", "naga/glsl-out", "wgpu-types/web", - "windows-result/std", # Need to enable this for the `Error` impl on `windows_result::Error` to work. + "windows-result/std", # Need to enable this for the `Error` impl on `windows_result::Error` to work. "windows/Win32_Graphics_Gdi", "windows/Win32_Graphics_OpenGL", "windows/Win32_System_LibraryLoader", @@ -346,9 +345,9 @@ cfg_aliases.workspace = true [dev-dependencies] env_logger.workspace = true -glam.workspace = true # for ray-traced-triangle example +glam.workspace = true # for ray-traced-triangle example naga = { workspace = true, features = ["wgsl-in", "termcolor"] } -winit.workspace = true # for "halmark" example +winit.workspace = true # for "halmark" example ### Platform: Windows + MacOS + Linux for "raw-gles" example ### [target.'cfg(not(any(target_arch = "wasm32", target_os = "ios", target_os = "visionos", target_env = "ohos")))'.dev-dependencies] diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index f39f32ca1..149b2e93a 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -233,7 +233,7 @@ static_assertions.workspace = true # Needed for only wgpu-core backend. Not optional as only wgpu-core backend exists on native platforms. wgpu-core = { workspace = true, features = [ "renderdoc", - "wgsl", # needed for indirect draw/dispatch validation + "wgsl", # needed for indirect draw/dispatch validation "portable-atomic", ] } wgpu-hal.workspace = true