A class defining a library of node definitions that can be added to a ComputeNodeGraph
A Library contains definitions and also stores MTLFunction implementations for
built-in nodes and you can construct new libraries containing nodes you provide.
These nodes are functions implemented using the Metal Shading Language and annotated
with the `[[stitchable]]` attribute.
final func definitionsMatching(inputs inputTypes: [ComputeNodeGraph.ValueType]) -> [ComputeNodeGraph.NodeDefinition]
Returns all definitions whose user-editable inputs, in order, match the given value types.
Non-user-editable inputs (framework-injected contexts, state bindings, etc.) are skipped
when comparing the input sequence — callers pass only the user-visible types.
convenience init(from library: any MTLLibrary, bundleIdentifier: String?)
Creates a library by extracting node definitions from a Metal library.
method · iOS 27.0+
merge
TypeScript
merge(library: ComputeNodeGraph_Library): void
Swift declaration
final func merge(contentsOf library: ComputeNodeGraph.Library)
Merges nodes from specified library into this library.
Use this method to merge libraries. If two nodes have the same name and bundle,
the nodes in `library` will replace ones in `self`.