Mirror of Betrusted repo
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sean Cross 70ad4b74db README: add initial readme
Signed-off-by: Sean Cross <sean@xobs.io>
3 years ago
src test: implement jump tests 3 years ago
Cargo.lock initial commit 3 years ago
Cargo.toml disassembler: implement disassembler 3 years ago
README.md README: add initial readme 3 years ago


The Engine Assembler

Provides an assembler-as-macro that lets you assemble The Engine bytecode in your program. For example, to create an infinite loop, run:

    let mcode = engine25519_as::assemble_engine25519!(
            brz start, #0


You can use a basic disassembler provided by this crate. To disassemble a single opcode, run:

    let opcode = engine25519_as::disasm::Opcode::from_i32(0x14_7985);
    println!("Opcode: {}", opcode);

Debugging the Macro

To debug the macro, use the nightly toolchain and enable the macro-debug feature.

An easy way to do this is:

$ cargo +nightly test --features macro-debug