Skip to main content

polydat_node

Attribute Macro polydat_node 

Source
#[polydat_node]
Expand description

#[polydat_node] — derive a polydat node from a typed Rust function signature.

See the crate docs for the argument and return shapes the macro accepts.

§Attribute parameters

  • category = <ident> — the polydat FuncCategory variant the node belongs to (Comparison, Math, String, etc.). Defaults to Misc when unspecified.
  • struct_name = <Ident> — the Rust name of the generated node struct. Defaults to the function name in PascalCase, so a node fn geo_cell produces struct GeoCell; set this when that name is already taken, typically by the value type the node returns. The DSL name is always the function name.
  • simd = "<node-name>" declares an exact, lane-independent register-typed implementation of the scalar function.
  • simd_total certifies that the declared SIMD implementation is defined for the complete scalar input domain. It requires simd.