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-27 01:10:14 +02:00 committed by GitHub
parent 86da69e33f
commit a40a760f27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 484 additions and 128 deletions

View file

@ -78,5 +78,7 @@ pub fn wrap_network_in_scope(mut network: NodeNetwork, editor_api: Arc<WasmEdito
exports: vec![NodeInput::node(NodeId(1), 0)],
nodes: nodes.into_iter().enumerate().map(|(id, node)| (NodeId(id as u64), node)).collect(),
scope_injections: [("editor-api".to_string(), (NodeId(2), concrete!(&WasmEditorApi)))].into_iter().collect(),
// TODO(TrueDoctor): check if it makes sense to set `generated` to `true`
generated: false,
}
}