Skip to content

Commit 9411612

Browse files
Move shader entrypoints to separate crate (#3157)
1 parent 50be135 commit 9411612

7 files changed

Lines changed: 27 additions & 5 deletions

File tree

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ members = [
1818
"node-graph/graphene-cli",
1919
"node-graph/graster-nodes",
2020
"node-graph/graster-nodes/shaders",
21+
"node-graph/graster-nodes/shaders/entrypoint",
2122
"node-graph/gstd",
2223
"node-graph/gsvg-renderer",
2324
"node-graph/interpreted-executor",

node-graph/graster-nodes/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ description = "graphene raster data format"
66
authors = ["Graphite Authors <contact@graphite.rs>"]
77
license = "MIT OR Apache-2.0"
88

9-
[lib]
10-
crate-type = ["rlib", "dylib"]
11-
129
[lints]
1310
workspace = true
1411

node-graph/graster-nodes/shaders/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ description = "graphene raster data format"
66
authors = ["Graphite Authors <contact@graphite.rs>"]
77
license = "MIT OR Apache-2.0"
88

9+
[lib]
10+
crate-type = ["rlib", "dylib"]
11+
912
[dependencies]
1013

1114
[build-dependencies]

node-graph/graster-nodes/shaders/build.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
2323
}
2424
}
2525

26-
let shader_crate = PathBuf::from(concat!(env!("CARGO_MANIFEST_DIR"), "/.."));
26+
let shader_crate = PathBuf::from(concat!(env!("CARGO_MANIFEST_DIR"), "/entrypoint"));
2727

2828
println!("cargo:rerun-if-env-changed=RUSTC_CODEGEN_SPIRV_PATH");
2929
let rustc_codegen_spirv_path = std::env::var("RUSTC_CODEGEN_SPIRV_PATH").unwrap_or_default();
@@ -43,7 +43,6 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
4343
let mut builder = backend.to_spirv_builder(shader_crate, "spirv-unknown-naga-wgsl");
4444
builder.print_metadata = MetadataPrintout::DependencyOnly;
4545
builder.spirv_metadata = SpirvMetadata::Full;
46-
builder.shader_crate_features.default_features = false;
4746
let wgsl_result = builder.build()?;
4847
let path_to_spv = wgsl_result.module.unwrap_single();
4948

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "graphene-raster-nodes-shaders-entrypoint"
3+
version = "0.1.0"
4+
edition = "2024"
5+
description = "graphene raster nodes shaders entrypoint"
6+
authors = ["Graphite Authors <contact@graphite.rs>"]
7+
license = "MIT OR Apache-2.0"
8+
9+
[lib]
10+
crate-type = ["rlib", "dylib"]
11+
12+
[dependencies]
13+
graphene-raster-nodes = { path = "../..", default-features = false }
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#![no_std]
2+
pub use graphene_raster_nodes::*;

0 commit comments

Comments
 (0)