Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid introducing spurious features for optional dependencies #5691

Merged
merged 2 commits into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ By @stefnotch in [#5410](https://github.com/gfx-rs/wgpu/pull/5410)

#### Naga

### Changes

#### General

- Avoid introducing spurious features for optional dependencies. By @bjorn3 in [#5691](https://github.com/gfx-rs/wgpu/pull/5691)

### Bug Fixes

#### GLES / OpenGL
Expand Down
12 changes: 6 additions & 6 deletions naga/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ all-features = true
[features]
default = []
dot-out = []
glsl-in = ["pp-rs"]
glsl-in = ["dep:pp-rs"]
glsl-out = []
msl-out = []
serialize = ["serde", "bitflags/serde", "indexmap/serde"]
deserialize = ["serde", "bitflags/serde", "indexmap/serde"]
serialize = ["dep:serde", "bitflags/serde", "indexmap/serde"]
deserialize = ["dep:serde", "bitflags/serde", "indexmap/serde"]
arbitrary = ["dep:arbitrary", "bitflags/arbitrary", "indexmap/arbitrary"]
spv-in = ["petgraph", "spirv"]
spv-out = ["spirv"]
wgsl-in = ["hexf-parse", "unicode-xid", "compact"]
spv-in = ["dep:petgraph", "dep:spirv"]
spv-out = ["dep:spirv"]
wgsl-in = ["dep:hexf-parse", "dep:unicode-xid", "compact"]
wgsl-out = []
hlsl-out = []
compact = []
Expand Down
2 changes: 1 addition & 1 deletion wgpu-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ strict_asserts = ["wgt/strict_asserts"]
serde = ["dep:serde", "wgt/serde", "arrayvec/serde"]

## Enable API tracing.
trace = ["ron", "serde", "naga/serialize"]
trace = ["dep:ron", "serde", "naga/serialize"]

## Enable API replaying
replay = ["serde", "naga/deserialize"]
Expand Down
38 changes: 19 additions & 19 deletions wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,30 @@ targets = [

[features]
default = ["link"]
metal = ["naga/msl-out", "block"]
metal = ["naga/msl-out", "dep:block"]
vulkan = [
"naga/spv-out",
"ash",
"gpu-alloc",
"gpu-descriptor",
"libloading",
"smallvec",
"android_system_properties",
"dep:ash",
"dep:gpu-alloc",
"dep:gpu-descriptor",
"dep:libloading",
"dep:smallvec",
"dep:android_system_properties",
]
gles = [
"naga/glsl-out",
"glow",
"glutin_wgl_sys",
"khronos-egl",
"libloading",
"ndk-sys",
"dep:glow",
"dep:glutin_wgl_sys",
"dep:khronos-egl",
"dep:libloading",
"dep:ndk-sys",
]
dx12 = [
"naga/hlsl-out",
"d3d12",
"bit-set",
"libloading",
"range-alloc",
"dep:d3d12",
"dep:bit-set",
"dep:libloading",
"dep:range-alloc",
"winapi/std",
"winapi/winbase",
"winapi/d3d12",
Expand All @@ -66,9 +66,9 @@ dx12 = [
"winapi/dxgi1_6",
]
# TODO: This is a separate feature until Mozilla okays windows-rs, see https://github.com/gfx-rs/wgpu/issues/3207 for the tracking issue.
windows_rs = ["gpu-allocator"]
dxc_shader_compiler = ["hassle-rs"]
renderdoc = ["libloading", "renderdoc-sys"]
windows_rs = ["dep:gpu-allocator"]
dxc_shader_compiler = ["dep:hassle-rs"]
renderdoc = ["dep:libloading", "dep:renderdoc-sys"]
fragile-send-sync-non-atomic-wasm = ["wgt/fragile-send-sync-non-atomic-wasm"]
link = ["metal/link"]
# Panic when running into an out-of-memory error (for debugging purposes).
Expand Down
4 changes: 2 additions & 2 deletions wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ vulkan-portability = ["wgc?/vulkan"]
## Enables the GLES backend on Wasm
##
## * ⚠️ WIP: Currently will also enable GLES dependencies on any other targets.
webgl = ["hal", "wgc/gles"]
webgl = ["dep:hal", "wgc/gles"]

#! **Note:** In the documentation, if you see that an item depends on a backend,
#! it means that the item is only available when that backend is enabled _and_ the backend
Expand All @@ -69,7 +69,7 @@ glsl = ["naga/glsl-in", "wgc/glsl"]
wgsl = ["wgc?/wgsl"]

## Enable accepting naga IR shaders as input.
naga-ir = ["naga"]
naga-ir = ["dep:naga"]

#! ### Logging & Tracing
# --------------------------------------------------------------------
Expand Down
Loading