Yet another Rust binding for Keystone assembler framework.
- Hierarchical architecture: low-level binding is done by keystone-sys
- Fully wrapped and reexported types: no more low-level stuffs
- Zero-copy: no additional memory allocation
- Windows support
use keystone::*;
fn main() {
let engine = Keystone::from(Arch::X86, Mode::Bit32)
.expect("Unable to initialize Keystone engine");
engine.option(OptionType::Syntax, OptionValue::SyntaxNasm)
.expect("Unable to set NASM syntax");
let asm = engine.asm("mov ebp, esp", 0x4000)
.expect("Unable to assemble");
println!("{}", asm);
}
- Remco Verhoef (@remco_verhoef) for the original work
- Some wrapper macros from capstone-rs