Files
keystone-engine-keystone/bindings/rust
Nguyen Anh Quynh 8b7ca00c50 x86: fix issue #168
2016-06-05 15:06:04 +08:00
..
2016-05-30 13:16:44 +02:00
2016-06-05 15:06:04 +08:00
2016-05-30 13:16:44 +02:00
2016-05-30 13:16:44 +02:00
2016-05-30 13:16:44 +02:00

keystone-rs

Rust bindings for the keystone engine.

Sample

extern crate keystone;
use keystone::{Keystone, Arch, Mode, OptionType, OptionValue};

fn main() {
    let engine = Keystone::new(Arch::X86, Mode::Mode32)
        .expect("Could not initialize Keystone engine");

    engine.option(OptionType::Syntax, OptionValue::SyntaxNASM)
        .expect("Could not set option to nasm syntax");

    let result = engine.asm("mov ah, 0x80".to_string(), 0)
        .expect("Could not assemble");

    let _ = result;
}

Testing

cargo test

Contributors

  • Remco Verhoef (@remco_verhoef)

Special thanks to:

  • Sébastien Duquette (@ekse) for his unicorn-rs binding