Post refactor fixup (#3395)

* fixup

* fix feature deps for native
This commit is contained in:
Timon
2025-11-18 15:48:45 +00:00
committed by GitHub
parent 6a3b098681
commit 7d739c4542
9 changed files with 13 additions and 158 deletions

View File

@@ -7,7 +7,7 @@ authors = ["Graphite Authors <contact@graphite.rs>"]
license = "MIT OR Apache-2.0"
[features]
default = ["wasm", "wgpu", "shader-nodes"]
default = ["wasm", "wgpu"]
gpu = []
wgpu = ["gpu", "graph-craft/wgpu", "graphene-application-io/wgpu"]
wasm = [

View File

@@ -6,8 +6,8 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
env_logger::builder().filter_level(log::LevelFilter::Debug).init();
// Skip building the shader if they are provided externally
println!("cargo:rerun-if-env-changed=GRAPHENE_RASTER_NODES_SHADER_PATH");
if !std::env::var("GRAPHENE_RASTER_NODES_SHADER_PATH").unwrap_or_default().is_empty() {
println!("cargo:rerun-if-env-changed=RASTER_NODES_SHADER_PATH");
if !std::env::var("RASTER_NODES_SHADER_PATH").unwrap_or_default().is_empty() {
return Ok(());
}
@@ -49,6 +49,6 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
// needs to be fixed upstream
let path_to_wgsl = path_to_spv.with_extension("wgsl");
println!("cargo::rustc-env=GRAPHENE_RASTER_NODES_SHADER_PATH={}", path_to_wgsl.display());
println!("cargo::rustc-env=RASTER_NODES_SHADER_PATH={}", path_to_wgsl.display());
Ok(())
}

View File

@@ -1 +1 @@
pub const WGSL_SHADER: &str = include_str!(env!("GRAPHENE_RASTER_NODES_SHADER_PATH"));
pub const WGSL_SHADER: &str = include_str!(env!("RASTER_NODES_SHADER_PATH"));