aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOriol Brufau <obrufau@igalia.com>2025-04-09 03:09:13 -0700
committerGitHub <noreply@github.com>2025-04-09 10:09:13 +0000
commit9c29acd6d85b467bb21665aef9babe2cf8fd4887 (patch)
tree4b4ce504e5521dab9ea23eabe592fdb27495205b
parenta04b648421e5aac75ce160ed3f9f95edf1b49e67 (diff)
downloadservo-9c29acd6d85b467bb21665aef9babe2cf8fd4887.tar.gz
servo-9c29acd6d85b467bb21665aef9babe2cf8fd4887.zip
Add serde and wgsl features to wgpu-core (#36411)
This fixes errors when running `./mach clippy -r -p layout_2020` and `./mach clippy -r -p script`. Also addressing an unused import warning when running the latter. Testing: These changes do not require tests because it's just a compile error fix. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
-rw-r--r--components/script/dom/bindings/buffer_source.rs6
-rw-r--r--components/shared/webgpu/Cargo.toml2
2 files changed, 5 insertions, 3 deletions
diff --git a/components/script/dom/bindings/buffer_source.rs b/components/script/dom/bindings/buffer_source.rs
index 054711ef874..dd6984e1eab 100644
--- a/components/script/dom/bindings/buffer_source.rs
+++ b/components/script/dom/bindings/buffer_source.rs
@@ -34,9 +34,11 @@ use js::rust::{
CustomAutoRooterGuard, Handle, MutableHandleObject,
MutableHandleValue as SafeMutableHandleValue,
};
+#[cfg(feature = "webgpu")]
+use js::typedarray::{ArrayBuffer, HeapArrayBuffer};
use js::typedarray::{
- ArrayBuffer, ArrayBufferU8, ArrayBufferView, ArrayBufferViewU8, CreateWith, HeapArrayBuffer,
- TypedArray, TypedArrayElement, TypedArrayElementCreator,
+ ArrayBufferU8, ArrayBufferView, ArrayBufferViewU8, CreateWith, TypedArray, TypedArrayElement,
+ TypedArrayElementCreator,
};
use crate::dom::bindings::error::{Error, Fallible};
diff --git a/components/shared/webgpu/Cargo.toml b/components/shared/webgpu/Cargo.toml
index 8b38af1fa6d..0a4aa4e7ff3 100644
--- a/components/shared/webgpu/Cargo.toml
+++ b/components/shared/webgpu/Cargo.toml
@@ -18,5 +18,5 @@ ipc-channel = { workspace = true }
malloc_size_of = { workspace = true }
serde = { workspace = true }
webrender_api = { workspace = true }
-wgpu-core = { workspace = true }
+wgpu-core = { workspace = true, features = ["serde", "wgsl"] }
wgpu-types = { workspace = true }