Add ::IDENTITY to node macro to return a ProtoNodeIdentifier that is always a &'static str (#2842)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run

* fix warnings on master

* make the `ProtoNodeIdentifier` of a Node be accessible and always a borrowed `&'static str`

* always generate `node_name::identifier()`, even with `skip_impl`

* make `FrontendNodeType` use Cow

* remove broken `DocumentNodeDefinition`s for old GPU nodes

* don't reexport `graphic_element` in it's entirety, only data structures

* adjust everything to use the new `node_name::identifier()`

* fixup imports for wasm

* turn identifier fn into a constant
This commit is contained in:
Firestar99 2025-07-08 01:29:59 +02:00 committed by GitHub
parent 4a83067081
commit 69ed80b79b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 213 additions and 523 deletions

View file

@ -20,7 +20,7 @@ mod tests {
NodeId(0),
DocumentNode {
inputs: vec![NodeInput::network(concrete!(u32), 0)],
implementation: DocumentNodeImplementation::ProtoNode(ProtoNodeIdentifier::new("graphene_core::ops::IdentityNode")),
implementation: DocumentNodeImplementation::ProtoNode(ops::identity::IDENTIFIER),
..Default::default()
},
),