| Crates.io | jazz |
| lib.rs | jazz |
| version | 0.2.2 |
| created_at | 2018-11-08 18:36:48.029387+00 |
| updated_at | 2018-11-16 17:19:09.97948+00 |
| description | Jazz Virtual Machine |
| homepage | |
| repository | https://github.com/playXE/Jazz |
| max_upload_size | |
| id | 95543 |
| size | 58,872 |
Jazz is a register-based virtual machine
VM is still in active develop so it's not recommended to use Jazz for your purposes
LoadInt(0,12) // Load 12 into R(0)
LoadInt(1,3) // Load 3 into R(1)
Add(2,1,0) // Add value from R(1) to R(0) and store result in R(2)
Ret(2) // Return value from R(2)
Jazz is heavily inspired by Gravity language VM
Library used for easy generating JazzVM code,example:
fn add_op(node: Node,b: &mut FunctionBuilder) {
visit(node.left,b);
visit(node.right,b);
let r3 = b.register_pop();
let r2 = b.register_pop();
let r1 = b.register_push_temp();
b.insert_op(Instruction::Add(r1,r2,r3));
}