# ZEN Engine: A Cross-Platform Business Rules Engine Powered by Rust

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/gorules-zen
Generated for open source discovery and AI-assisted research.

ZEN Engine is an open-source, cross-platform Business Rules Engine written in Rust. It provides native bindings for various languages like NodeJS, Python, Go, and JVM, enabling developers to integrate powerful decision-making logic into their applications. The engine utilizes the JSON Decision Model (JDM) for defining and executing complex business rules efficiently.

GitHub: https://github.com/gorules/zen
OSRepos URL: https://osrepos.com/repo/gorules-zen

## Summary

ZEN Engine is an open-source, cross-platform Business Rules Engine written in Rust. It provides native bindings for various languages like NodeJS, Python, Go, and JVM, enabling developers to integrate powerful decision-making logic into their applications. The engine utilizes the JSON Decision Model (JDM) for defining and executing complex business rules efficiently.

## Topics

- Rust
- Business Rules Engine
- Decision Model
- NodeJS
- Python
- Go
- JVM
- Open Source

## Repository Information

Last analyzed by OSRepos: Sun Oct 19 2025 00:01:16 GMT+0100 (Western European Summer Time)
Detail views: 2
GitHub clicks: 0

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

ZEN Engine is an open-source, cross-platform Business Rules Engine (BRE) meticulously crafted in **Rust**. It provides robust native bindings for a wide array of programming languages, including **NodeJS**, **Python**, **Go**, **Kotlin (JVM)**, and **Java**, allowing seamless integration of complex decision-making logic into diverse applications. At its core, ZEN Engine is designed to load and execute JSON Decision Models (JDM), offering a standardized and efficient way to define and manage business rules. This powerful engine empowers developers to build intelligent, adaptable systems with ease.

## Installation

Getting started with ZEN Engine, especially with its Rust core, is straightforward. For Rust projects, you can add `zen-engine` as a dependency in your `Cargo.toml` file.

toml
[dependencies]
zen-engine = "0"


For other supported platforms, native bindings are available and can be integrated via their respective package managers:
*   **NodeJS**: Install via npm.
*   **Python**: Install via pip.
*   **Go**: Integrate using Go modules.

Refer to the official documentation for detailed installation instructions for each platform.

## Examples

The following Rust example demonstrates how to load a JSON Decision Model and evaluate it using the ZEN Engine. This snippet showcases the simplicity and power of integrating the engine into your Rust application.

rust
use serde_json::json;
use zen_engine::DecisionEngine;
use zen_engine::model::DecisionContent;

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(decision_content.into());

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


This example initializes a `DecisionEngine`, loads decision content from a JSON file, creates a decision, and then evaluates it with a given input.

## Why Use It?

ZEN Engine stands out as an excellent choice for implementing business rules due to several key advantages:

*   **Cross-Platform Compatibility**: With native bindings for Rust, NodeJS, Python, Go, Kotlin (JVM), and Java, ZEN Engine offers unparalleled flexibility, allowing you to use it across your preferred technology stack.
*   **High Performance**: Built on Rust, known for its speed and memory efficiency, the engine delivers high-performance rule execution, crucial for demanding applications.
*   **JSON Decision Model (JDM)**: It leverages JDM, a clear and structured JSON-based format for defining decision models, making rules human-readable, maintainable, and easily shareable.
*   **Rich Decision Logic**: Supports various node types like Decision Tables, Switch Nodes, Function Nodes, Expression Nodes, and Decision Nodes, enabling the creation of highly complex and dynamic decision flows.
*   **Modularity and Reusability**: The ability to invoke and reuse other decision models promotes modular design, reducing redundancy and improving maintainability in large systems.
*   **Open-Source**: Released under the MIT License, ZEN Engine is free to use, modify, and distribute, fostering community collaboration and transparency.

## Links

Explore ZEN Engine further through these official resources:

*   **GitHub Repository**: <a href="https://github.com/gorules/zen" target="_blank">gorules/zen</a>
*   **Official Documentation**: <a href="https://gorules.io/docs/developers/bre/engines/rust" target="_blank">Rust Engine Docs</a>
*   **JDM Editor (GitHub)**: <a href="https://github.com/gorules/jdm-editor" target="_blank">gorules/jdm-editor</a>
*   **Free Online JDM Editor**: <a href="https://editor.gorules.io" target="_blank">editor.gorules.io</a>
*   **NodeJS Binding (npmjs)**: <a href="https://www.npmjs.com/package/@gorules/zen-engine" target="_blank">@gorules/zen-engine</a>
*   **Python Binding (pypi)**: <a href="https://pypi.org/project/zen-engine/" target="_blank">zen-engine</a>
*   **Rust Binding (crates.io)**: <a href="https://crates.io/crates/zen-engine" target="_blank">zen-engine</a>
*   **Go Binding (GitHub)**: <a href="https://github.com/gorules/zen-go" target="_blank">gorules/zen-go</a>