Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.05 KB

README.md

File metadata and controls

35 lines (26 loc) · 1.05 KB

keystone-rs

Yet another Rust binding for Keystone assembler framework.

Features

  • 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

Sample

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);
}

Contributors

Acknowledgments