Files
zen/core/expression
Stefan 1224ea4c75 fix: nullable keys after switch joins, no default-to-0 fix where errors skip, fallible outputs don't shadow, integer and aliased fields in missing cases
- keys set by only some switch branches are nullable where branches join, in $nodes and in graph output
- the (x ?? 0) fix is not offered in graph table cells and switch conditions, where an error means no match
- a graph first-hit row whose output can fail no longer makes later rows unreachable
- integer schema fields drop gaps without integers; min/max are read through nullable anyOf
- columns over the same field path ((x), x['y']) share one dimension; derived columns overlapping another column are left out of gap checks
2026-10-02 09:05:00 +02:00
..
2026-09-29 09:59:44 +02:00
2026-09-29 23:07:09 +02:00
2026-09-29 23:07:09 +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