rhai 0.16.0

Embedded scripting for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
let a = 42;
let b = 123;
let x = 999;

if a > b {
    print("Oops! a > b");
} else if a < b {
    print("a < b, x should be 0");

    let x = 0;          // this 'x' shadows the global 'x'
    print(x);           // should print 0
} else {
    print("Oops! a == b");
}