Skip to main content

Crate openinfer_dsl

Crate openinfer_dsl 

Source
Expand description

Procedural macro DSL for building OpenInfer graphs.

The graph! macro parses a compact DSL into openinfer::Graph structures. It is intended for ergonomics in tests and examples.

§DSL structure

  • Memory sections: dynamic, volatile, constant, persistent
  • Blocks: block entry { ... }
  • Nodes: assign, op, branch, loop, yield, await, cache ops

§Expansion

The macro expands into Rust code that constructs Graph values at runtime.

§Example

use openinfer::graph;
let g = graph! {
    dynamic { x: f32[B]; }
    block entry {
        return;
    }
};

Macros§

graph
Build an OpenInfer Graph from the DSL input.