This library is in flux. APIs may change without notice. Generated from source with koruc 0.1.7 on 8/19/2026.

Eval

~import std/eval

Expression Evaluator Standard Library

eval.kz · 2 tors · ~[runtime]

Expression Evaluator Standard Library · 22 more lines
Expression Evaluator Standard Library Runtime evaluation of Koru/Zig expressions DESIGN: - Expressions are parsed at parse-time (not strings!) - Evaluation happens at runtime against a binding environment - Supports literals, bindings, field access, comparisons, boolean ops - Matches Zig expression syntax for parity Usage: import std/eval std/eval:eval(expression: score > 50, bindings: env) | bool b |> if(b) ... | int n |> ... | string s |> ... | error e |> ... // Or inline in conditionals: std/eval:eval-bool(expression: user.role == "admin", bindings: env) | true |> ... | false |> ...