Skip to content

Naga transpiling to wgsl #76

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
219 changes: 217 additions & 2 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exclude = [
resolver = "2"

[workspace.dependencies]
spirv-builder = { git = "https://github.com/Rust-GPU/rust-gpu", rev = "86fc48032c4cd4afb74f1d81ae859711d20386a1", default-features = false }
spirv-builder = { git = "https://github.com/Rust-GPU/rust-gpu", rev = "8cb17db18d8a44e1de7c9b3ea2b65d5aaf24b919", default-features = false }
anyhow = "1.0.94"
clap = { version = "4.5.37", features = ["derive"] }
crossterm = "0.28.1"
Expand All @@ -28,6 +28,7 @@ tempdir = "0.3.7"
test-log = "0.2.16"
cargo_metadata = "0.19.2"
semver = "1.0.26"
naga = "25.0.1"

# This crate MUST NEVER be upgraded, we need this particular "first" version to support old rust-gpu builds
legacy_target_specs = { package = "rustc_codegen_spirv-target-specs", version = "0.9.0", features = ["include_str"] }
Expand Down
8 changes: 8 additions & 0 deletions crates/cargo-gpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ build = "build.rs"
default-run = "cargo-gpu"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
# Enable naga transpiling
naga = ["dep:naga"]
# Enable naga transpiling to wgsl
wgsl-out = ["naga", "naga/wgsl-out"]

[dependencies]
cargo_metadata.workspace = true
anyhow.workspace = true
Expand All @@ -24,9 +30,11 @@ serde.workspace = true
serde_json.workspace = true
crossterm.workspace = true
semver.workspace = true
naga = { workspace = true, optional = true, features = ["spv-in"] }

[dev-dependencies]
test-log.workspace = true
cargo_metadata = { workspace = true, features = ["builder"] }

[lints]
workspace = true
Loading
Loading