v2.0

GoRules Version 2 is here - redesigned, now with managed cloud.GoRules Version 2 is here!

Watch the launch videoWatch
Rust SDK

Rust
rules engine.

Pure Rust rules engine with zero-cost abstractions. Async-ready business rule evaluation with maximum performance and memory safety.

Up and running
in three steps.

Install the SDK, load a decision graph, evaluate - the same JSON your team edits in the visual editor runs in your process.

Step 1

Add the Dependency

Add the GoRules engine to your Cargo.toml.

cargo add zen-engine
Step 2

Load a Decision

Create an engine and load your decision graph.

use std::sync::Arc;
use zen_engine::DecisionEngine;
use zen_engine::model::DecisionContent;

let content: DecisionContent = serde_json::from_str(
    include_str!("./decision.json")
)?;

let engine = DecisionEngine::default();
let decision = engine.create_decision(Arc::new(content))?;
Step 3

Evaluate Rules

Pass your input data and receive the decision result.

use serde_json::json;

let result = decision.evaluate(json!({
    "customer": { "tier": "premium", "country": "US" },
    "cart": { "total": 150, "items": 3 }
}).into()).await?;

println!("{:?}", result.result); // {"discount": 15, "freeShipping": true}

Why
Rust?

Built for performance and developer experience - native speed with an API that feels at home in your codebase.

Zero-Cost Abstractions

Pure Rust implementation with no runtime overhead. Compile-time optimizations for maximum speed.

Async Runtime

Built on Tokio for efficient async execution. Perfect for high-throughput applications.

Memory Safe

Rust's ownership model guarantees memory safety without garbage collection pauses.

About the Rust SDK

The GoRules Rust SDK is the foundation of our entire ecosystem. Written in pure Rust, it provides the highest possible performance for business rule evaluation with zero-cost abstractions and compile-time optimizations.

The engine leverages Rust's ownership model for guaranteed memory safety without garbage collection pauses. Built on Tokio, it supports efficient async execution for I/O-bound operations while maintaining blazing-fast synchronous evaluation for pure rule processing.

This is the same engine that powers all our other language SDKs through native bindings. For applications where every microsecond counts, or when you want maximum control over the rule evaluation process, the Rust SDK delivers uncompromising performance.

See the public Zen Engine benchmarks

Build with Rust.
Govern with GoRules.

The engine is open source and free forever - add the GoRules BRMS when your team needs versioning, approvals, and an audit trail.