Update rust-gpu to `0.10.0-alpha.1` (#4033)

* rust-gpu alpha.1: update nix flake

* rust-gpu alpha.1: disable non-working mold shell hook

* rust-gpu alpha.1: update rust-gpu to `0.10.0-alpha.1` on crates

* Review

* Fix gpu nodes

* Reduce wasm size

---------

Co-authored-by: Timon <me@timon.zip>
This commit is contained in:
Firestar99 2026-04-28 01:53:49 +02:00 committed by GitHub
parent 3d84e63ef9
commit 824d1162eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 61 additions and 261 deletions

View File

@ -9,6 +9,9 @@ rustflags = [
"-C",
"link-arg=--max-memory=4294967296",
"--cfg=web_sys_unstable_apis",
# TODO: Remove this and find a better way to stay within the 25MB limit of cloudflare pages
"-C",
"opt-level=s",
]
[env]

View File

@ -9,7 +9,7 @@ let
"rustc-dev"
"llvm-tools"
];
toolchain = pkgs.rust-bin.nightly."2025-06-23".default.override {
toolchain = pkgs.rust-bin.nightly."2026-04-11".default.override {
inherit extensions;
};
cargo = pkgs.writeShellScriptBin "cargo" ''
@ -32,14 +32,12 @@ let
}).buildRustPackage
(finalAttrs: {
pname = "rustc_codegen_spirv";
version = "0-unstable-2025-08-04";
src = pkgs.fetchFromGitHub {
owner = "Firestar99";
repo = "rust-gpu-new";
rev = "c12f216121820580731440ee79ebc7403d6ea04f";
hash = "sha256-rG1cZvOV0vYb1dETOzzbJ0asYdE039UZImobXZfKIno=";
version = "0.10.0-alpha.1";
src = pkgs.fetchCrate {
inherit (finalAttrs) pname version;
sha256 = "sha256-zJEpExkPgYzwo7fR4ge4GxJNj7H5yo4bJ4eTOw36+7c=";
};
cargoHash = "sha256-AEigcEc5wiBd3zLqWN/2HSbkfOVFneAqNvg9HsouZf4=";
cargoHash = "sha256-J1rtbfGqrL2NJ7Bu2pYfDwCdUmnECB/kzxrpYluA0kY=";
cargoBuildFlags = [
"-p"
"rustc_codegen_spirv"

View File

@ -22,7 +22,6 @@ pkgs.mkShell (
pkgs.lld
pkgs.nodejs
pkgs.nodePackages.npm
pkgs.binaryen
pkgs.wasm-bindgen-cli_0_2_100
pkgs.wasm-pack
@ -55,9 +54,9 @@ pkgs.mkShell (
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath libs}:${deps.cef.env.CEF_PATH}";
XDG_DATA_DIRS = "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS";
shellHook = ''
alias cargo='mold --run cargo'
'';
# shellHook = ''
# alias cargo='mold --run cargo'
# '';
}
// deps.cef.env
// deps.rustGPU.env

View File

@ -82,7 +82,6 @@ deps.crane.lib.buildPackage (
pkgs.pkg-config
pkgs.lld
pkgs.nodejs
pkgs.nodePackages.npm
pkgs.binaryen
pkgs.wasm-bindgen-cli_0_2_100
pkgs.wasm-pack

218
Cargo.lock generated
View File

@ -446,22 +446,16 @@ dependencies = [
]
[[package]]
name = "cargo-gpu"
version = "0.1.0"
source = "git+https://github.com/Firestar99/cargo-gpu?rev=3952a22d16edbd38689f3a876e417899f21e1fe7#3952a22d16edbd38689f3a876e417899f21e1fe7"
name = "cargo-gpu-install"
version = "0.10.0-alpha.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82bad075de69e455c338955b4a7d58c0ced253185ef7703a3c6a3846e2d5ee66"
dependencies = [
"anyhow",
"cargo_metadata",
"clap",
"crossterm",
"directories",
"dunce",
"env_logger",
"log",
"relative-path",
"semver",
"serde",
"serde_json",
"spirv-builder",
]
@ -780,15 +774,6 @@ dependencies = [
"windows-sys 0.60.2",
]
[[package]]
name = "convert_case"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7"
dependencies = [
"unicode-segmentation",
]
[[package]]
name = "convert_case"
version = "0.8.0"
@ -1001,33 +986,6 @@ version = "0.8.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
[[package]]
name = "crossterm"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b"
dependencies = [
"bitflags 2.11.0",
"crossterm_winapi",
"derive_more",
"document-features",
"mio",
"parking_lot",
"rustix",
"signal-hook",
"signal-hook-mio",
"winapi",
]
[[package]]
name = "crossterm_winapi"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b"
dependencies = [
"winapi",
]
[[package]]
name = "crunchy"
version = "0.2.4"
@ -1138,7 +1096,6 @@ version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3"
dependencies = [
"convert_case 0.7.1",
"proc-macro2",
"quote",
"syn 2.0.106",
@ -1615,15 +1572,6 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]]
name = "fsevent-sys"
version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2"
dependencies = [
"libc",
]
[[package]]
name = "futf"
version = "0.1.5"
@ -1819,13 +1767,13 @@ dependencies = [
[[package]]
name = "glam"
version = "0.29.3"
version = "0.32.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8babf46d4c1c9d92deac9f7be466f76dfc4482b6452fc5024b5e8daf6ffeb3ee"
checksum = "f70749695b063ecbf6b62949ccccde2e733ec3ecbbd71d467dca4e5c6c97cca0"
dependencies = [
"bytemuck",
"libm",
"serde",
"serde_core",
]
[[package]]
@ -2709,26 +2657,6 @@ dependencies = [
"rustversion",
]
[[package]]
name = "inotify"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3"
dependencies = [
"bitflags 2.11.0",
"inotify-sys",
"libc",
]
[[package]]
name = "inotify-sys"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb"
dependencies = [
"libc",
]
[[package]]
name = "interpreted-executor"
version = "0.1.0"
@ -2909,26 +2837,6 @@ version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"
[[package]]
name = "kqueue"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eac30106d7dce88daf4a3fcb4879ea939476d5074a9b7ddd0fb97fa4bed5596a"
dependencies = [
"kqueue-sys",
"libc",
]
[[package]]
name = "kqueue-sys"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b"
dependencies = [
"bitflags 1.3.2",
"libc",
]
[[package]]
name = "kurbo"
version = "0.13.0"
@ -3199,7 +3107,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c"
dependencies = [
"libc",
"log",
"wasi 0.11.1+wasi-snapshot-preview1",
"windows-sys 0.59.0",
]
@ -3337,7 +3244,7 @@ dependencies = [
name = "node-docs"
version = "0.0.0"
dependencies = [
"convert_case 0.8.0",
"convert_case",
"graph-craft",
"graphene-std",
"indoc",
@ -3349,7 +3256,7 @@ dependencies = [
name = "node-macro"
version = "0.0.0"
dependencies = [
"convert_case 0.8.0",
"convert_case",
"core-types",
"indoc",
"no-std-types",
@ -3361,30 +3268,6 @@ dependencies = [
"syn 2.0.106",
]
[[package]]
name = "notify"
version = "8.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3"
dependencies = [
"bitflags 2.11.0",
"fsevent-sys",
"inotify",
"kqueue",
"libc",
"log",
"mio",
"notify-types",
"walkdir",
"windows-sys 0.60.2",
]
[[package]]
name = "notify-types"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d"
[[package]]
name = "nu-ansi-term"
version = "0.50.1"
@ -4366,7 +4249,7 @@ dependencies = [
name = "raster-nodes-shaders"
version = "0.1.0"
dependencies = [
"cargo-gpu",
"cargo-gpu-install",
"env_logger",
"log",
]
@ -4505,15 +4388,6 @@ version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001"
[[package]]
name = "relative-path"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bca40a312222d8ba74837cb474edef44b37f561da5f773981007a10bbaa992b0"
dependencies = [
"serde",
]
[[package]]
name = "renderdoc-sys"
version = "1.1.0"
@ -4697,25 +4571,18 @@ version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
[[package]]
name = "rustc_codegen_spirv-target-specs"
version = "0.9.0"
source = "git+https://github.com/Rust-GPU/rust-gpu?rev=c12f216121820580731440ee79ebc7403d6ea04f#3f05f5482824e3b1fbb44c9ef90a8795a0204c7c"
dependencies = [
"serde",
"strum",
"thiserror 2.0.18",
]
[[package]]
name = "rustc_codegen_spirv-types"
version = "0.9.0"
source = "git+https://github.com/Rust-GPU/rust-gpu?rev=c12f216121820580731440ee79ebc7403d6ea04f#3f05f5482824e3b1fbb44c9ef90a8795a0204c7c"
version = "0.10.0-alpha.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ac3a589ac4bf0931b69299679803063986f280a2b82ace70e7f8b2d0db0dec2"
dependencies = [
"rspirv",
"semver",
"serde",
"serde_json",
"spirv",
"thiserror 2.0.18",
]
[[package]]
@ -5101,36 +4968,6 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "signal-hook"
version = "0.3.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2"
dependencies = [
"libc",
"signal-hook-registry",
]
[[package]]
name = "signal-hook-mio"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd"
dependencies = [
"libc",
"mio",
"signal-hook",
]
[[package]]
name = "signal-hook-registry"
version = "1.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b"
dependencies = [
"libc",
]
[[package]]
name = "simd-adler32"
version = "0.3.7"
@ -5286,16 +5123,14 @@ dependencies = [
[[package]]
name = "spirv-builder"
version = "0.9.0"
source = "git+https://github.com/Rust-GPU/rust-gpu?rev=c12f216121820580731440ee79ebc7403d6ea04f#3f05f5482824e3b1fbb44c9ef90a8795a0204c7c"
version = "0.10.0-alpha.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b721e6d7d7bc999126e838d16b070c8beada89ff8251c3f8a9e5292102827d86"
dependencies = [
"cargo_metadata",
"clap",
"log",
"memchr",
"notify",
"raw-string",
"rustc_codegen_spirv-target-specs",
"rustc_codegen_spirv-types",
"semver",
"serde",
@ -5305,8 +5140,9 @@ dependencies = [
[[package]]
name = "spirv-std"
version = "0.9.0"
source = "git+https://github.com/Firestar99/rust-gpu-new?rev=c12f216121820580731440ee79ebc7403d6ea04f#c12f216121820580731440ee79ebc7403d6ea04f"
version = "0.10.0-alpha.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68cdc5ca01151f2627fdf1cff34bf6452f5dc212a6d09f4aa5a9b4f17e9bc8e3"
dependencies = [
"bitflags 1.3.2",
"bytemuck",
@ -5319,8 +5155,9 @@ dependencies = [
[[package]]
name = "spirv-std-macros"
version = "0.9.0"
source = "git+https://github.com/Firestar99/rust-gpu-new?rev=c12f216121820580731440ee79ebc7403d6ea04f#c12f216121820580731440ee79ebc7403d6ea04f"
version = "0.10.0-alpha.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23b8538ad79b81964125710a912c46f3ea71c4f5732bab5d24d506b86ea8fde0"
dependencies = [
"proc-macro2",
"quote",
@ -5330,8 +5167,9 @@ dependencies = [
[[package]]
name = "spirv-std-types"
version = "0.9.0"
source = "git+https://github.com/Firestar99/rust-gpu-new?rev=c12f216121820580731440ee79ebc7403d6ea04f#c12f216121820580731440ee79ebc7403d6ea04f"
version = "0.10.0-alpha.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28b7ffce7843c3a9f5d5d2b9c21402d4cd026c26780b2f16a3cd6de3e6436230"
[[package]]
name = "stable_deref_trait"
@ -5536,7 +5374,7 @@ dependencies = [
name = "text-nodes"
version = "0.1.0"
dependencies = [
"convert_case 0.8.0",
"convert_case",
"core-types",
"dyn-any",
"fancy-regex",

View File

@ -164,7 +164,7 @@ polycool = "0.4"
# Linebender ecosystem (END)
rand = { version = "0.9", default-features = false, features = ["std_rng"] }
rand_chacha = "0.9"
glam = { version = "0.29", default-features = false, features = [
glam = { version = "0.32.1", default-features = false, features = [
"nostd-libm",
"scalar-math",
"bytemuck",
@ -211,8 +211,8 @@ rfd = "0.17"
open = "5.3"
spin = "0.10"
clap = "4.5"
spirv-std = { git = "https://github.com/Firestar99/rust-gpu-new", rev = "c12f216121820580731440ee79ebc7403d6ea04f", features = ["bytemuck"] }
cargo-gpu = { git = "https://github.com/Firestar99/cargo-gpu", rev = "3952a22d16edbd38689f3a876e417899f21e1fe7", default-features = false }
spirv-std = { version = "0.10.0-alpha.1", features = ["bytemuck"] }
cargo-gpu-install = { version = "0.10.0-alpha.1", default-features = false }
qrcodegen = "1.8"
lzma-rust2 = { version = "0.16", default-features = false, features = ["std", "encoder", "optimization", "xz"] }
scraper = "0.25"

View File

@ -2,11 +2,11 @@
"nodes": {
"crane": {
"locked": {
"lastModified": 1770169865,
"narHash": "sha256-iPiy13xzDQ9GjpOez+NNIjh/qjl7i4RDf9dF2x5mF9I=",
"lastModified": 1776635034,
"narHash": "sha256-OEOJrT3ZfwbChzODfIH4GzlNTtOFuZFWPtW7jIeR8xU=",
"owner": "ipetkov",
"repo": "crane",
"rev": "8254ccf3b5b5131890ee073776f2e61c6d1e55d4",
"rev": "dc7496d8ea6e526b1254b55d09b966e94673750f",
"type": "github"
},
"original": {
@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1770197578,
"narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=",
"lastModified": 1776548001,
"narHash": "sha256-ZSK0NL4a1BwVbbTBoSnWgbJy9HeZFXLYQizjb2DPF24=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2",
"rev": "b12141ef619e0a9c1c84dc8c684040326f27cdcc",
"type": "github"
},
"original": {
@ -45,11 +45,11 @@
]
},
"locked": {
"lastModified": 1770347142,
"narHash": "sha256-uz+ZSqXpXEPtdRPYwvgsum/CfNq7AUQ/0gZHqTigiPM=",
"lastModified": 1776741231,
"narHash": "sha256-k9G98qzn+7npROUaks8VqCFm7cFtEG8ulQLBBo5lItg=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "2859683cd9ef7858d324c5399b0d8d6652bf4044",
"rev": "02061303f7c4c964f7b4584dabd9e985b4cd442b",
"type": "github"
},
"original": {

View File

@ -28,7 +28,7 @@ glam = ["dep:glam"]
dyn-any-derive = { path = "derive", optional = true }
# Optional dependencies
glam = { version = "0.29", optional = true, default-features = false }
glam = { version = "0.32.1", optional = true, default-features = false }
reqwest = { version = "0.13", optional = true, default-features = false }
[package.metadata.docs.rs]

View File

@ -40,7 +40,6 @@ glam_array!(glam::Vec2, [f32; 2]);
glam_array!(glam::Vec3, [f32; 3]);
// glam_array!(Vec3A, [f32; 4]);
glam_array!(glam::Vec4, [f32; 4]);
glam_array!(glam::Quat, [f32; 4]);
glam_cols_array!(glam::Mat2, [f32; 4]);
glam_cols_array!(glam::Mat3, [f32; 9]);
// glam_cols_array!(Mat3A, [f32; 4]);
@ -51,7 +50,6 @@ glam_cols_array!(glam::Affine3A, [f32; 12]);
glam_array!(glam::DVec2, [f64; 2]);
glam_array!(glam::DVec3, [f64; 3]);
glam_array!(glam::DVec4, [f64; 4]);
glam_array!(glam::DQuat, [f64; 4]);
glam_cols_array!(glam::DMat2, [f64; 4]);
glam_cols_array!(glam::DMat3, [f64; 9]);
glam_cols_array!(glam::DMat4, [f64; 16]);

View File

@ -26,7 +26,6 @@ identity!(isize);
identity!(f32);
identity!(f64);
identity!(spirv_std::arch::SubgroupMask);
identity!(spirv_std::memory::Semantics);
identity!(spirv_std::ray_tracing::RayFlags);
identity!(spirv_std::indirect_command::DrawIndirectCommand);

View File

@ -3,7 +3,7 @@ use crate::shader_runtime::per_pixel_adjust_runtime::PerPixelAdjustShaderRuntime
pub mod per_pixel_adjust_runtime;
pub const FULLSCREEN_VERTEX_SHADER_NAME: &str = "fullscreen_vertexfullscreen_vertex";
pub const FULLSCREEN_VERTEX_SHADER_NAME: &str = "fullscreen_vertex_fullscreen_vertex";
pub struct ShaderRuntime {
context: WgpuContext,

View File

@ -70,8 +70,7 @@ impl PerPixelAdjustGraphicsPipeline {
let fragment_name = &name;
let fragment_name = &fragment_name[(fragment_name.find("::").unwrap() + 2)..];
// TODO workaround to naga removing `:`
let fragment_name = fragment_name.replace(":", "");
let fragment_name = fragment_name.replace("::", "_");
let shader_module = device.create_shader_module(ShaderModuleDescriptor {
label: Some(&format!("PerPixelAdjust {name} wgsl shader")),
source: ShaderSource::Wgsl(Cow::Borrowed(info.wgsl_shader)),

View File

@ -66,7 +66,7 @@ impl ShaderCodegen for PerPixelAdjust {
}
}
let entry_point_mod = format_ident!("{}_gpu_entry_point", fn_name);
let entry_point_mod = format_ident!("{}_gpu", fn_name);
let entry_point_name_ident = format_ident!("ENTRY_POINT_NAME");
let entry_point_name = quote!(#entry_point_mod::#entry_point_name_ident);
let uniform_struct_ident = format_ident!("Uniform");

View File

@ -6,12 +6,9 @@ description = "graphene raster data format"
authors = ["Graphite Authors <contact@graphite.art>"]
license = "MIT OR Apache-2.0"
[lib]
crate-type = ["rlib", "dylib"]
[dependencies]
[build-dependencies]
cargo-gpu = { workspace = true }
cargo-gpu-install = { workspace = true }
env_logger = { workspace = true }
log = { workspace = true }

View File

@ -1,5 +1,5 @@
use cargo_gpu::InstalledBackend;
use cargo_gpu::spirv_builder::{MetadataPrintout, SpirvMetadata};
use cargo_gpu_install::install::{Install, InstalledBackend};
use cargo_gpu_install::spirv_builder::SpirvMetadata;
use std::path::PathBuf;
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
@ -29,19 +29,18 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
let rustc_codegen_spirv_path = std::env::var("RUSTC_CODEGEN_SPIRV_PATH").unwrap_or_default();
let backend = if rustc_codegen_spirv_path.is_empty() {
// install the toolchain and build the `rustc_codegen_spirv` codegen backend with it
cargo_gpu::Install::from_shader_crate(shader_crate.clone()).run()?
Install::from_shader_crate(shader_crate.clone()).run()?
} else {
// use the `RUSTC_CODEGEN_SPIRV` environment variable to find the codegen backend
let mut backend = InstalledBackend::default();
backend.rustc_codegen_spirv_location = PathBuf::from(rustc_codegen_spirv_path);
backend.toolchain_channel = "nightly".to_string();
backend.target_spec_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
backend
};
// build the shader crate
let mut builder = backend.to_spirv_builder(shader_crate, "spirv-unknown-naga-wgsl");
builder.print_metadata = MetadataPrintout::DependencyOnly;
builder.build_script.defaults = true;
builder.spirv_metadata = SpirvMetadata::Full;
let wgsl_result = builder.build()?;
let path_to_spv = wgsl_result.module.unwrap_single();

View File

@ -6,8 +6,5 @@ description = "graphene raster nodes shaders entrypoint"
authors = ["Graphite Authors <contact@graphite.art>"]
license = "MIT OR Apache-2.0"
[lib]
crate-type = ["rlib", "dylib"]
[dependencies]
raster-nodes = { path = "../..", default-features = false }

View File

@ -1,26 +0,0 @@
{
"allows-weak-linkage": false,
"arch": "spirv",
"crt-objects-fallback": "false",
"crt-static-allows-dylibs": true,
"crt-static-respected": true,
"data-layout": "e-m:e-p:32:32:32-i64:64-n8:16:32:64",
"dll-prefix": "",
"dll-suffix": ".spv.json",
"dynamic-linking": true,
"emit-debug-gdb-scripts": false,
"env": "naga-wgsl",
"linker-flavor": "unix",
"linker-is-gnu": false,
"llvm-target": "spirv-unknown-naga-wgsl",
"main-needs-argc-argv": false,
"metadata": {
"description": null,
"host_tools": null,
"std": null,
"tier": null
},
"panic-strategy": "abort",
"simd-types-indirect": false,
"target-pointer-width": "32"
}