build: Exclude wgpu-core when building the WebGPU-backend samples (#9557)

This commit is contained in:
Andy Leiserson authored and GitHub committed 2026-06-12 13:39:28 -04:00
1 parent 98a70621f2
commit 08b244df91
8 files changed
+38 -14

No files matched your search

+2 -2
View File
@@ -130,8 +130,8 @@ strict_asserts = ["wgpu-core?/strict_asserts", "wgpu-types/strict_asserts"]
## Enables serialization via `serde` on common wgpu types.
serde = ["wgpu-core?/serde", "wgpu-types/serde"]
# ## Allow writing of trace capture files. See [`Adapter::request_device`].
trace = ["serde", "wgpu-core?/trace"]
## Allow writing of trace capture files. See [`Adapter::request_device`].
trace = ["serde", "wgpu-core?/trace", "wgpu-types/trace"]
#! ### External libraries
# --------------------------------------------------------------------
+2 -2
View File
@@ -2,7 +2,7 @@ use alloc::{boxed::Box, string::String, sync::Arc, vec::Vec};
use core::{
error, fmt,
num::NonZero,
ops::{Bound, Deref, Range, RangeBounds},
ops::{Bound, Range, RangeBounds},
};
use crate::util::Mutex;
@@ -287,7 +287,7 @@ impl Buffer {
#[cfg(wgpu_core)]
pub unsafe fn as_hal<A: hal::Api>(
&self,
) -> Option<impl Deref<Target = A::Buffer> + WasmNotSendSync> {
) -> Option<impl core::ops::Deref<Target = A::Buffer> + WasmNotSendSync> {
let buffer = self.inner.as_core_opt()?;
unsafe { buffer.context.buffer_as_hal::<A>(buffer) }
}
+2 -2
View File
@@ -1,5 +1,5 @@
use alloc::boxed::Box;
use core::ops::{Deref, RangeBounds};
use core::ops::RangeBounds;
use crate::{api::DeferredCommandBufferActions, *};
@@ -338,7 +338,7 @@ impl Queue {
#[cfg(wgpu_core)]
pub unsafe fn as_hal<A: hal::Api>(
&self,
) -> Option<impl Deref<Target = A::Queue> + WasmNotSendSync> {
) -> Option<impl core::ops::Deref<Target = A::Queue> + WasmNotSendSync> {
let queue = self.inner.as_core_opt()?;
unsafe { queue.context.queue_as_hal::<A>(queue) }
}
+2
View File
@@ -603,6 +603,8 @@ pub trait QueueWriteBufferInterface: CommonTraits {
}
pub trait BufferMappedRangeInterface: CommonTraits {
// Used only in wgpu_core's `impl QueueWriteBufferInterface`
#[cfg_attr(not(wgpu_core), expect(unused))]
fn len(&self) -> usize;
/// # Safety
+1
View File
@@ -1,4 +1,5 @@
//! Convenience macros
#![cfg_attr(not(wgpu_core), expect(unused_macros, unused_imports))]
#[cfg(doc)]
use crate::{VertexAttribute, VertexBufferLayout, VertexFormat};