rust-rule-engine 1.20.1

A blazing-fast Rust rule engine with RETE algorithm, backward chaining inference, and GRL (Grule Rule Language) syntax. Features: forward/backward chaining, pattern matching, unification, O(1) rule indexing, TMS, expression evaluation, method calls, streaming with Redis state backend, watermarking, and custom functions. Production-ready for business rules, expert systems, real-time stream processing, and decision automation.
Documentation
rule "SpeedUp" salience 10 {
    when
        TestCar.SpeedUp == true && TestCar.Speed < TestCar.MaxSpeed
    then
        TestCar.setSpeed(TestCar.Speed + TestCar.SpeedIncrement);
        log("Speed increased to " + TestCar.Speed);
}

rule "SlowDown" salience 8 {
    when
        TestCar.SpeedUp == false && TestCar.Speed > 0
    then
        TestCar.setSpeed(TestCar.Speed - TestCar.SpeedIncrement);
        log("Speed decreased to " + TestCar.Speed);
}

rule "MaxSpeedReached" salience 15 {
    when
        TestCar.Speed >= TestCar.MaxSpeed
    then
        TestCar.setSpeedUp(false);
        log("Maximum speed reached, stopping acceleration");
}

rule "MinSpeedReached" salience 12 {
    when
        TestCar.Speed <= 0
    then
        TestCar.setSpeedUp(true);
        TestCar.setSpeed(0);
        log("Minimum speed reached, starting acceleration");
}