Files
zen/core/expression
stefan-gorules d852f71e56 refactor: run handle (#575)
* refactor(engine): carry the depth limit on the evaluation handle

* refactor(engine): name the per-row evaluation handles

* refactor(engine): pass one invocation through the compiled entry points

* refactor(engine): track nesting depth on the evaluation handle

* refactor(engine): drop argument-count allowances that no longer apply

* refactor(engine): pass context and trace probe as one lane value

* refactor(engine): hand the invocation to the policy entry

* refactor(engine): read function timeout and nodes-in-context once per evaluation

* refactor(expression): pass the evaluation context to comparison and table-cell helpers
2026-11-23 12:40:58 +01:00
..
2026-11-17 17:37:10 +01:00
2026-11-23 12:40:58 +01:00
2026-11-21 20:09:14 +01:00
2026-11-17 17:37:10 +01:00
2026-10-21 17:48:01 +02:00

ZEN Expression Language

The expression language of ZEN Engine, the open-source Business Rules Engine (BRE) from GoRules.

License: MIT crates.io

ZEN expressions are readable by business users and fast enough for hot paths: a complete language for conditions, calculations and data transformation, with lexer, parser, compiler, VM, type checking and editor completions included in this crate.

use serde_json::json;
use zen_expression::evaluate_expression;

fn main() {
    let result = evaluate_expression(
        "sum(items) * multiplier",
        json!({ "items": [10, 20, 30], "multiplier": 2 }).into(),
    )
    .unwrap();
    // => 120
}

Reusable expressions compile once via compile_expression and evaluate repeatedly against different contexts.

Resources

License

MIT License