Skip to content

Commit 62cf5ae

Browse files
bushrat011899kpreid
andcommitted
wgpu-sync: remove alloc feature
The project is otherwise not `no_alloc` compatible, and is capable of making a breaking change in the future if desirable. Co-Authored-By: Kevin Reid <kpreid@switchb.org>
1 parent abd54d8 commit 62cf5ae

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ jobs:
333333
# Check with all compatible features
334334
cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-types --no-default-features --features strict_asserts,fragile-send-sync-non-atomic-wasm,serde,counters
335335
cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p naga-types --no-default-features --features serialize,deserialize
336-
cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-sync --no-default-features --features alloc
336+
cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-sync --no-default-features
337337
cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p naga --no-default-features --features dot-out,spv-in,spv-out,glsl-out,msl-out,serialize,deserialize,wgsl-in,wgsl-out,hlsl-out
338338
cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --no-default-features --features fragile-send-sync-non-atomic-wasm
339339
cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-core --no-default-features --features api_log_info,resource_log_info,strict_asserts,serde,wgsl,spirv,counters,noop

wgpu-sync/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@ alloc_instead_of_core = "warn"
2929

3030
[features]
3131
default = ["std"]
32-
std = ["alloc", "dep:parking_lot", "once_cell/std"]
33-
alloc = ["once_cell/alloc"]
32+
std = ["dep:parking_lot", "once_cell/std"]
3433

3534
[dependencies]
3635
cfg-if.workspace = true
3736
lock_api = { workspace = true, default-features = false }
3837
parking_lot = { workspace = true, optional = true }
39-
once_cell = { workspace = true, default-features = false, features = ["race"] }
38+
once_cell = { workspace = true, default-features = false, features = ["alloc", "race"] }

wgpu-sync/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
//! Provides [`Mutex`] and [`RwLock`] types with an appropriate implementation.
1111
12-
#[cfg(feature = "alloc")]
1312
extern crate alloc;
1413
#[cfg(feature = "std")]
1514
extern crate std;
@@ -26,9 +25,7 @@ pub use rwlock::RawRwLock;
2625
#[cfg(feature = "std")]
2726
pub use parking_lot::{Condvar, Mutex as CondvarMutex};
2827

29-
#[cfg(feature = "alloc")]
30-
pub use once_cell::race::OnceBox;
31-
pub use once_cell::race::{OnceBool, OnceNonZeroUsize, OnceRef};
28+
pub use once_cell::race::{OnceBool, OnceBox, OnceNonZeroUsize, OnceRef};
3229

3330
cfg_if::cfg_if! {
3431
if #[cfg(feature = "std")] {

0 commit comments

Comments
 (0)