Add automatic type conversion and the node graph preprocessor (#2478)

* Prototype document network level into node insertion

* Implement Convert trait / node for places we can't use Into

* Add isize/usize and i128/u128 implementations for Convert trait

* Factor out substitutions into preprocessor crate

* Simplify layer node further

* Code review

* Mark preprocessed networks as generated

* Revert changes to layer node definition

* Skip generated flag for serialization

* Don't expand for tests

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Dennis Kobert
2025-06-26 16:10:14 -07:00
committed by GitHub
co-authored by Keavon Chambers
parent 86da69e33f
commit a40a760f27
15 changed files with 484 additions and 128 deletions
Generated
+19
View File
@@ -2175,6 +2175,7 @@ dependencies = [
"graphene-std",
"interpreted-executor",
"log",
"preprocessor",
"tokio",
"wgpu",
"wgpu-executor",
@@ -2282,6 +2283,7 @@ dependencies = [
"log",
"num_enum",
"once_cell",
"preprocessor",
"ron",
"serde",
"serde_json",
@@ -4475,6 +4477,23 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
[[package]]
name = "preprocessor"
version = "0.1.0"
dependencies = [
"base64 0.22.1",
"dyn-any",
"futures",
"glam",
"graph-craft",
"graphene-std",
"interpreted-executor",
"log",
"serde",
"serde_json",
"tokio",
]
[[package]]
name = "presser"
version = "0.3.1"