Skip to main content

Module registry

Module registry 

Source
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. Categories group the registry for listings (by_category). The stdlib files carry a // @category: Name line for readers; FuncCategory::parse maps that text but no compile path consumes it.

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.
NodeRegistration
A node module’s registration: signatures + builder.
ParamSpec
Describes one parameter in a function’s call signature.

Enums§

Arity
Arity specification for a function signature.
DefaultResolver
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.
FuncCategory
Functional category for a Polydat node function.
OutputType
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§

NodeBuildFn
Builder for a node module: (name, wires, resolved wire port types, const args) -> Some(Ok(node)) / Some(Err(msg)), or None when the name isn’t handled by this module.