mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-02 16:08:13 +08:00
Move shader entrypoints to separate crate (#3157)
This commit is contained in:
Generated
+7
@@ -2207,6 +2207,13 @@ dependencies = [
|
|||||||
"env_logger",
|
"env_logger",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "graphene-raster-nodes-shaders-entrypoint"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"graphene-raster-nodes",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "graphene-std"
|
name = "graphene-std"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ members = [
|
|||||||
"node-graph/graphene-cli",
|
"node-graph/graphene-cli",
|
||||||
"node-graph/graster-nodes",
|
"node-graph/graster-nodes",
|
||||||
"node-graph/graster-nodes/shaders",
|
"node-graph/graster-nodes/shaders",
|
||||||
|
"node-graph/graster-nodes/shaders/entrypoint",
|
||||||
"node-graph/gstd",
|
"node-graph/gstd",
|
||||||
"node-graph/gsvg-renderer",
|
"node-graph/gsvg-renderer",
|
||||||
"node-graph/interpreted-executor",
|
"node-graph/interpreted-executor",
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ description = "graphene raster data format"
|
|||||||
authors = ["Graphite Authors <contact@graphite.rs>"]
|
authors = ["Graphite Authors <contact@graphite.rs>"]
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
|
|
||||||
[lib]
|
|
||||||
crate-type = ["rlib", "dylib"]
|
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ description = "graphene raster data format"
|
|||||||
authors = ["Graphite Authors <contact@graphite.rs>"]
|
authors = ["Graphite Authors <contact@graphite.rs>"]
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
crate-type = ["rlib", "dylib"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let shader_crate = PathBuf::from(concat!(env!("CARGO_MANIFEST_DIR"), "/.."));
|
let shader_crate = PathBuf::from(concat!(env!("CARGO_MANIFEST_DIR"), "/entrypoint"));
|
||||||
|
|
||||||
println!("cargo:rerun-if-env-changed=RUSTC_CODEGEN_SPIRV_PATH");
|
println!("cargo:rerun-if-env-changed=RUSTC_CODEGEN_SPIRV_PATH");
|
||||||
let rustc_codegen_spirv_path = std::env::var("RUSTC_CODEGEN_SPIRV_PATH").unwrap_or_default();
|
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>> {
|
|||||||
let mut builder = backend.to_spirv_builder(shader_crate, "spirv-unknown-naga-wgsl");
|
let mut builder = backend.to_spirv_builder(shader_crate, "spirv-unknown-naga-wgsl");
|
||||||
builder.print_metadata = MetadataPrintout::DependencyOnly;
|
builder.print_metadata = MetadataPrintout::DependencyOnly;
|
||||||
builder.spirv_metadata = SpirvMetadata::Full;
|
builder.spirv_metadata = SpirvMetadata::Full;
|
||||||
builder.shader_crate_features.default_features = false;
|
|
||||||
let wgsl_result = builder.build()?;
|
let wgsl_result = builder.build()?;
|
||||||
let path_to_spv = wgsl_result.module.unwrap_single();
|
let path_to_spv = wgsl_result.module.unwrap_single();
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
[package]
|
||||||
|
name = "graphene-raster-nodes-shaders-entrypoint"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2024"
|
||||||
|
description = "graphene raster nodes shaders entrypoint"
|
||||||
|
authors = ["Graphite Authors <contact@graphite.rs>"]
|
||||||
|
license = "MIT OR Apache-2.0"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
crate-type = ["rlib", "dylib"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
graphene-raster-nodes = { path = "../..", default-features = false }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#![no_std]
|
||||||
|
pub use graphene_raster_nodes::*;
|
||||||
Reference in New Issue
Block a user