Risp is a programming environment. It's implemented in Rust and compiles to x86-64 at runtime to execute it.
This is SUPER hacky and will probably fail to run all but the simplest programs. It may even eat your homework.
- Basic arithmetic expressions, e.g.
1 + 2 + 3 * 4
evaluates to15
. - Function definitions and evaluation, e.g.
def add_one (x) { 1 + x } add_one(41)
evaluates to42
. - Variable definitions, e.g.
let x = 3
. - Early return statements, e.g.
return 42
. - Conditional statements, e.g.
if x { return 1 }
. - Assignment statements, e.g.
x = x + 1
. - Simple boolean expressions in conditions, e.g.
if x < 3 {}
orif x == y {}
. - Compound boolean expressions in conditions, e.g.
if x > 5 && x < 10 {}
. - While loops, e.g.
while x < 10 { x = x + 1 }
.
- Install Rust via Rustup.
- Build the project using
cargo build
. - Run the Risp environment with
cargo run
.