gorules is a free, open source miscellaneous project written in Rust and released under MIT. It has 1,994 GitHub stars, 211 forks and 41 open issues, and was last pushed 23 days ago. On this registry it ranks #21 of 25 tracked projects in Miscellaneous, with 5 head-to-head comparisons available. It gained 14 stars over the last 6 tracked days.

What is gorules?

What it is

ZEN Engine is cross-platform open-source Business Rules Engine written in Rust under MIT license. It gives one portable JSON copy of rules. Owner reads rule. Every system runs same rule. It lives in Rust ecosystem and provides native bindings for Node.js, Python, Go, Java, Kotlin, .NET, plus iOS and Android packages.

It solves split between business logic and application code. Teams keep decision logic outside services. Conditions use ZEN Expression Language. Conditions read like sentences. Developer view is one toggle away. One source of truth prevents drift.

Key capabilities

  • Runs same JSON decisions in Rust, Node.js, Python, Go, Java, Kotlin, .NET, iOS, Android with microsecond evaluation.
  • Stores rules as portable JSON and leaves loading to file system, database, or service call.
  • Models decisions as graphs with decision tables, switches, expressions, functions, reusable sub-decisions.
  • Models decisions as policy documents with prose, typed data models, tables, match blocks, assertions; both compile to same engine and return same answers.
  • Provides static workspace analysis with type flow, exhaustiveness checking, write-conflict detection, and diagnostics before runtime.
  • Supports per-column collect across all matching rows while rest of table stays first-match.
  • Offers React JDM Editor and free Online Editor with simulator; unified bindings include configurable loaders, batch evaluation, and consistent error envelopes.

Who uses it and how

  • Teams put business rules in portable JSON and let systems evaluate them.
  • Developers embed engine in Rust, Node.js, Python, Go, Java, Kotlin, .NET, iOS, or Android code.
  • Business owners read and edit rules through graph canvas or policy documents, then systems run same rule.
  • Teams use Online Editor or embed React JDM Editor to model and simulate decisions.
  • Teams load decision content from file, database, or service call and call evaluate with input JSON.

Getting started

Add zen-engine = "2" from crates.io, install @gorules/zen-engine from npm, or install zen-engine from PyPI; load JSON decision content and call evaluate. Try free Online Editor or embed open-source React JDM Editor.

When to use it — and when not to

Use when needing open-source rule engine with portable JSON and same evaluation across many platforms. Avoid if needing long history or many contributors; facts show repo age 0 years, contributors 0, open issues 41. Self-hoster must choose and operate JSON loading path, such as file system, database, or service call; Rust migration from 0.x needs arbitrary_precision feature if relying on arbitrary-precision number handling.

project readme (upstream, from github) — read inline

ZEN Engine

Business logic humans can read and machines can run. One copy of your rules: the owner reads it, every system runs it.

License: MIT crates.io npm PyPI

ZEN Engine is a cross-platform, open-source Business Rules Engine (BRE) written in Rust, with native bindings for Node.js, Python, Go, Java, Kotlin and .NET, plus iOS and Android packages. Decisions evaluate in microseconds, run identically on every platform, and are stored as portable JSON. Loading the JSON is up to you: file system, database or service call.

Try it in the free Online Editor with a built-in simulator, or embed the open-source React JDM Editor in your own product.

Rules that read like sentences

Conditions are written the way the business says them, in the ZEN Expression Language. The developer view is one toggle away, and the two can never drift apart: there is only one source of truth, and this engine runs it.

Rules as graphs, or as documents

Model a decision on a visual canvas of decision tables, switches, expressions, functions and reusable sub-decisions. Or write it as a policy document with prose, typed data models and tables. Both compile to the same engine and return the same answers.

To go deeper on the decision model and each node type, see the JDM documentation and the ZEN Expression Language reference.

What's new in 2.0

Version 2.0 is the first stable release of the new engine line:

  • Policy documents: model decisions as readable documents with typed data models, expressions, decision tables, match blocks and assertions. Policies compile to the same engine as graphs and return the same answers.
  • Workspace analysis: static type checking across policies and graphs. Type flow, exhaustiveness checking, write-conflict detection and precise diagnostics, all available before anything runs.
  • Per-column collect: decision table output columns can collect across all matching rows (tags[]) while the rest of the table stays first-match.
  • Pre-compiled engine: decisions are parsed and compiled once at load; evaluation is allocation-light and repeat-safe.
  • Hardened runtime: out-of-range numbers, arithmetic overflow and malformed inputs return errors or nulls instead of crashing the process.
  • Unified bindings: configurable loaders, batch evaluation and consistent error envelopes across Node.js, Python, Go and FFI consumers.

[!IMPORTANT] Migrating from 0.x (Rust crates): arbitrary_precision is no longer enabled by default in zen-engine, zen-expression, zen-types and zen-tmpl. If you rely on arbitrary-precision number handling, add features = ["arbitrary_precision"] to your dependency. Bindings (Node.js, Python, C, UniFFI) are unaffected, they opt in automatically.

Quickstart

Rust

[dependencies]
zen-engine = "2"
use serde_json::json;
use std::sync::Arc;
use zen_engine::model::DecisionContent;
use zen_engine::DecisionEngine;

async fn evaluate() {
    let decision_content: DecisionContent =
        serde_json::from_str(include_str!("jdm_graph.json")).unwrap();
    let engine = DecisionEngine::default();
    let decision = engine.create_decision(Arc::new(decision_content)).unwrap();

    let result = decision.evaluate(json!({ "input": 12 }).into()).await;
}

Node.js

npm i @gorules/zen-engine
import { ZenEngine } from '@gorules/zen-engine';
import fs from 'fs/promises';

const content = await fs.readFile('./jdm_graph.json');
const engine = new ZenEngine();

const decision = engine.createDecision(content);
const result = await decision.evaluate({ input: 15 });

Python

pip install zen-engine
import zen

with open("./jdm_graph.json", "r") as f:
    content = f.read()

engine = zen.ZenEngine()

decision = engine.create_decision(content)
result = decision.evaluate({"input": 15})

Full guides, including loaders for multi-decision graphs and batch evaluation:

The GoRules platform

The engine is open at the core; GoRules is the platform around it. Managed cloud, self-hosted, or embedded with no network hop. SOC 2 Type II.

AI that builds rules, and stays reviewable

An AI copilot and MCP server that edits rules, runs tests and explains decisions. It never deploys. Releases stay with your reviewers.

Promote like a release, run like a binary

A release moves from testing to staging to production untouched. Approvals, instant rollback, and a paper trail for every change.

Prove it before it ships

Scenario suites run on every change, coverage is measured against decision paths, and every answer comes with a replayable trace.

Support matrix

Arch Rust Node.js Python Go Java / Kotlin .NET
linux-x64-gnu :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
linux-arm64-gnu :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
darwin-x64 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
darwin-arm64 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
win32-x64-msvc :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
linux-x64-musl :heavy_check_mark: :heavy_check_mark: :x: :x: :x: :x:
linux-arm64-musl :heavy_check_mark: :heavy_check_mark: :x: :x: :x: :x:
linux-s390x :heavy_check_mark: :x: :x: :x: :heavy_check_mark: :x:
wasm32 (WASI) :heavy_check_mark: :heavy_check_mark: :x: :x: :x: :x:

Mobile: Swift (iOS XCFramework) and Android (AAR) packages are published from the same core via UniFFI.

Contribution

The JDM standard is growing and we need to keep tight control over its development and roadmap, as a number of companies use GoRules ZEN Engine and GoRules BRMS. For this reason we can't accept code contributions at this moment, apart from help with documentation and additional tests.

License

MIT License

Frequently asked questions

Is gorules free to use?

gorules is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does gorules do?

Open-source Business Rules Engine for your Rust, NodeJS, Python, Go, Java, C#, Kotlin (JVM), Kotlin (Android) and Swift (iOS) applications.

What is gorules written in?

gorules is primarily written in Rust. Its source is publicly available at https://github.com/gorules/zen, and it has 1,994 GitHub stars.