Expand description
Function registry: known function signatures for DSL validation.
Each registered function declares its name, category, expected wire inputs, constant parameters, output count, and variadic behavior. The compiler uses this to validate calls at parse time and to generically dispatch variadic functions.
Categories are a type-safe enum — every function must declare one.
The describe wiring functions command groups by category automatically.
Stdlib modules declare their category via // @category: Name
comment syntax.
Signatures are owned by their respective node modules. This file defines the shared types and the collector function.
Re-exports§
pub use crate::ast::CompileLevel;
Structs§
- FuncSig
- Description of a registered function’s signature.
- Node
Registration - A node module’s registration: signatures + builder.
- Param
Spec - Describes one parameter in a function’s call signature.
Enums§
- Arity
- Arity specification for a function signature.
- Default
Resolver - Auto-resolver kind attached to handle-taking functions. Tells the binding compiler which resolver to splice in when a string source is wired to a handle input port.
- Func
Category - Functional category for a Polydat node function.
- Output
Type - Output-type contract for a registered function.
Functions§
- by_
category - Return functions grouped by category in display order.
- lookup
- Find a registered function by name.
- registry
- Return the full registry of known functions.
- suggest_
function - Find the closest function name to a misspelling.
Type Aliases§
- Node
Build Fn - Builder for a node module:
(name, wires, resolved wire port types, const args) -> Some(Ok(node)) / Some(Err(msg)), orNonewhen the name isn’t handled by this module.