Skip to content

Commit

Permalink
Refactor Cargo.toml Signifigantly
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald committed Jan 23, 2025
1 parent 3cd2e7c commit 72d50fd
Show file tree
Hide file tree
Showing 47 changed files with 430 additions and 477 deletions.
43 changes: 23 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 14 additions & 44 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,14 @@ repository = "https://github.com/gfx-rs/wgpu"
version = "24.0.0"
authors = ["gfx-rs developers"]

[workspace.dependencies.wgc]
package = "wgpu-core"
path = "./wgpu-core"
version = "24.0.0"

[workspace.dependencies.wgt]
package = "wgpu-types"
path = "./wgpu-types"
version = "24.0.0"

[workspace.dependencies.hal]
package = "wgpu-hal"
path = "./wgpu-hal"
version = "24.0.0"

[workspace.dependencies.naga]
path = "./naga"
version = "24.0.0"

[workspace.dependencies]
naga = { version = "24.0.0", path = "./naga" }
wgpu-core = { version = "24.0.0", path = "./wgpu-core" }
wgpu-hal = { version = "24.0.0", path = "./wgpu-hal" }
wgpu-macros = { version = "24.0.0", path = "./wgpu-macros" }
wgpu-test = { version = "24.0.0", path = "./tests" }
wgpu-types = { version = "24.0.0", path = "./wgpu-types" }

anyhow = "1.0.95"
argh = "0.1.13"
arrayvec = "0.7"
Expand All @@ -102,7 +90,7 @@ hashbrown = { version = "0.15.2", default-features = false, features = [
"inline-more",
] }
heck = "0.5.0"
image = { version = "0.24", default-features = false, features = ["png"] }
image = { version = "0.25", default-features = false, features = ["png"] }
indexmap = "2"
itertools = { version = "0.13.0" }
ktx2 = "0.3"
Expand All @@ -111,8 +99,7 @@ libloading = "0.8"
libtest-mimic = "0.8.1"
log = "0.4"
nanorand = { version = "0.7", default-features = false, features = ["wyrand"] }
# https://github.com/Razaekel/noise-rs/issues/335 (Updated dependencies)
noise = { version = "0.8", git = "https://github.com/Razaekel/noise-rs.git", rev = "c6942d4fb70af26db4441edcf41f90fa115333f2" }
noise = "0.9"
nv-flip = "0.1"
obj = "0.10"
once_cell = "1.20.2"
Expand All @@ -139,7 +126,7 @@ smallvec = "1"
static_assertions = "1.1.0"
strum = { version = "0.26.0", features = ["derive"] }
trybuild = "1"
tracy-client = "0.17"
tracy-client = "0.18"
thiserror = "2"
wgpu = { version = "24.0.0", path = "./wgpu", default-features = false, features = [
"serde",
Expand All @@ -148,10 +135,6 @@ wgpu = { version = "24.0.0", path = "./wgpu", default-features = false, features
"metal",
"static-dxc",
] }
wgpu-core = { version = "24.0.0", path = "./wgpu-core" }
wgpu-macros = { version = "24.0.0", path = "./wgpu-macros" }
wgpu-test = { version = "24.0.0", path = "./tests" }
wgpu-types = { version = "24.0.0", path = "./wgpu-types" }
winit = { version = "0.29", features = ["android-native-activity"] }

# Metal dependencies
Expand All @@ -166,7 +149,7 @@ ash = "0.38.0"
gpu-alloc = "0.6"
gpu-descriptor = "0.3"

# DX dependencies
# DX12 dependencies
bit-set = "0.8"
gpu-allocator = { version = "0.27", default-features = false }
range-alloc = "0.1"
Expand All @@ -180,7 +163,7 @@ glutin = { version = "0.31", default-features = false }
glutin-winit = { version = "0.4", default-features = false }
glutin_wgl_sys = "0.6"

# DX and GLES dependencies
# DX12 and GLES dependencies
windows = { version = "0.58", default-features = false }

# wasm32 dependencies
Expand All @@ -191,7 +174,7 @@ wasm-bindgen = "0.2.97"
wasm-bindgen-futures = "0.4.45"
wasm-bindgen-test = "0.3"
web-sys = { version = "0.3.74", default-features = false }
web-time = "0.2.4"
web-time = "1"

# deno dependencies
deno_console = "0.179.0"
Expand All @@ -206,21 +189,8 @@ termcolor = "1.4.1"
# android dependencies
ndk-sys = "0.5.0"

[patch."https://github.com/gfx-rs/naga"]

[patch."https://github.com/zakarumych/gpu-descriptor"]
#gpu-descriptor = { path = "../gpu-descriptor/gpu-descriptor" }

[patch."https://github.com/zakarumych/gpu-alloc"]
#gpu-alloc = { path = "../gpu-alloc/gpu-alloc" }

[patch.crates-io]
#glow = { path = "../glow" }
#web-sys = { path = "../wasm-bindgen/crates/web-sys" }
#js-sys = { path = "../wasm-bindgen/crates/js-sys" }
#wasm-bindgen = { path = "../wasm-bindgen" }

# These overrides allow our examples to explicitly depend on release crates
[patch.crates-io]
wgpu = { path = "./wgpu" }

[profile.release]
Expand Down
47 changes: 24 additions & 23 deletions deno_webgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,37 @@ path = "lib.rs"
# We make all dependencies conditional on not being wasm,
# so the whole workspace can built as wasm.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
deno_core.workspace = true
serde = { workspace = true, features = ["derive"] }
tokio = { workspace = true, features = ["full"] }
wgt = { workspace = true, package = "wgpu-types", features = ["serde"] }
raw-window-handle = { workspace = true }
thiserror.workspace = true

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgpu-core]
workspace = true
features = [
wgpu-core = { workspace = true, features = [
"raw-window-handle",
"trace",
"replay",
"serde",
"strict_asserts",
"wgsl",
"gles",
]
] }
wgpu-types = { workspace = true, features = ["serde"] }

deno_core.workspace = true
raw-window-handle = { workspace = true }
serde = { workspace = true, features = ["derive"] }
thiserror.workspace = true
tokio = { workspace = true, features = ["full"] }

# We want the wgpu-core Metal backend on macOS and iOS.
[target.'cfg(target_vendor = "apple")'.dependencies.wgpu-core]
workspace = true
features = ["metal"]
# Apple Platforms
#
# We want the Metal backend.
[target.'cfg(target_vendor = "apple")'.dependencies]
wgpu-core = { workspace = true, features = ["metal"] }

# We want the wgpu-core Direct3D backend on Windows.
[target.'cfg(windows)'.dependencies.wgpu-core]
workspace = true
features = ["dx12"]
# Windows
#
# We want the DX12 backend.
[target.'cfg(windows)'.dependencies]
wgpu-core = { workspace = true, features = ["dx12"] }

# We want the wgpu-core Vulkan backend on Unix (but not Emscripten) and Windows.
[target.'cfg(any(windows, all(unix, not(target_os = "emscripten"))))'.dependencies.wgpu-core]
workspace = true
features = ["vulkan"]
# Windows and Unit (not Emscripten)
#
# We want the Vulkan backend.
[target.'cfg(any(windows, all(unix, not(target_os = "emscripten"))))'.dependencies]
wgpu-core = { workspace = true, features = ["vulkan"] }
1 change: 0 additions & 1 deletion deno_webgpu/binding.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

use super::error::WebGpuResult;
use super::wgpu_types;
use deno_core::error::AnyError;
use deno_core::op2;
use deno_core::OpState;
Expand Down
1 change: 0 additions & 1 deletion deno_webgpu/buffer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

use super::error::WebGpuResult;
use super::wgpu_types;
use deno_core::futures::channel::oneshot;
use deno_core::op2;
use deno_core::OpState;
Expand Down
1 change: 0 additions & 1 deletion deno_webgpu/bundle.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

use super::wgpu_types;
use deno_core::op2;
use deno_core::OpState;
use deno_core::Resource;
Expand Down
1 change: 0 additions & 1 deletion deno_webgpu/command_encoder.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

use super::wgpu_types;
use crate::WebGpuQuerySet;
use deno_core::error::AnyError;
use deno_core::op2;
Expand Down
2 changes: 0 additions & 2 deletions deno_webgpu/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ use std::borrow::Cow;
use std::cell::RefCell;
use std::collections::HashSet;
use std::rc::Rc;
pub use wgpu_core;
pub use wgt as wgpu_types;

use error::WebGpuResult;

Expand Down
1 change: 0 additions & 1 deletion deno_webgpu/pipeline.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

use super::wgpu_types;
use deno_core::error::AnyError;
use deno_core::op2;
use deno_core::OpState;
Expand Down
1 change: 0 additions & 1 deletion deno_webgpu/queue.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

use super::wgpu_types;
use crate::command_encoder::WebGpuCommandBuffer;
use crate::Instance;
use deno_core::error::AnyError;
Expand Down
1 change: 0 additions & 1 deletion deno_webgpu/render_pass.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

use super::wgpu_types;
use deno_core::op2;
use deno_core::OpState;
use deno_core::Resource;
Expand Down
1 change: 0 additions & 1 deletion deno_webgpu/sampler.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

use super::wgpu_types;
use deno_core::op2;
use deno_core::OpState;
use deno_core::Resource;
Expand Down
1 change: 0 additions & 1 deletion deno_webgpu/shader.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

use super::wgpu_types;
use deno_core::op2;
use deno_core::OpState;
use deno_core::Resource;
Expand Down
1 change: 0 additions & 1 deletion deno_webgpu/surface.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

use super::wgpu_types;
use super::WebGpuResult;
use deno_core::op2;
use deno_core::OpState;
Expand Down
1 change: 0 additions & 1 deletion deno_webgpu/texture.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

use super::wgpu_types;
use deno_core::op2;
use deno_core::OpState;
use deno_core::Resource;
Expand Down
Loading

0 comments on commit 72d50fd

Please sign in to comment.