Native Swift API
Idiomatic Swift with strong typing, optionals, and error handling via throwing functions.
GoRules Version 2 is here - redesigned, now with managed cloud.GoRules Version 2 is here!
Watch the launch videoWatchOpen source Swift rules engine for iOS apps. Offline-capable business rule evaluation with native performance.
Install the SDK, load a decision graph, evaluate - the same JSON your team edits in the visual editor runs in your process.
// Package.swift
dependencies: [
.package(url: "https://github.com/gorules/zen-ios", from: "0.1.0")
]import ZenEngine
let engine = ZenEngine()
let content = try String(contentsOfFile: "decision.json")
let decision = try engine.createDecision(content: content)let input: [String: Any] = [
"customer": ["tier": "premium", "country": "US"],
"cart": ["total": 150, "items": 3]
]
let result = try decision.evaluate(input)
print(result.result) // ["discount": 15, "freeShipping": true]Built for performance and developer experience - native speed with an API that feels at home in your codebase.
Idiomatic Swift with strong typing, optionals, and error handling via throwing functions.
Evaluate rules entirely on-device. No network required after loading the decision graph.
Full support for iOS. Works with SwiftUI and UIKit.
GoRules brings high-performance business rules evaluation to the Apple ecosystem. The Swift SDK provides native bindings to our Rust core, delivering exceptional performance for iOS applications.
Designed with Swift idioms in mind, the SDK offers a clean, type-safe API that feels natural to Swift developers. Whether you're building mobile apps that need offline rule evaluation or server-side Swift applications with Vapor, GoRules integrates seamlessly with your codebase.
The engine runs entirely on-device, making it perfect for apps that need to evaluate business rules without network connectivity. All processing happens locally with no external API calls, ensuring user privacy and instant response times.
See the public Zen Engine benchmarksThe engine is open source and free forever - add the GoRules BRMS when your team needs versioning, approvals, and an audit trail.