capstone_rust 0.1.0

A Capstone engine binding for Rust
docs.rs failed to build capstone_rust-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: capstone_rust-0.2.3

capstone-rust

Build Status

Capstone engine binding for rust (stable, beta, nightly). The 'sys' part is generated by bindgen. Tested against Capstone 3.0.4, but should work even with newer versions: if you find that something is broken please fill a bug report!

Instruction details are partially supported.

use capstone_rust::capstone as cs;

fn main() {
	let code = vec![0x55, 0x48, 0x8b, 0x05, 0xb8, 0x13, 0x00, 0x00];

	let dec = cs::Capstone::new(cs::cs_arch::CS_ARCH_X86, cs::cs_mode::CS_MODE_32).unwrap();
	let buf = dec.disasm(code, 0, 0).unwrap();
	for x in buf.iter() {
	    println!("{:x}: {} {}", x.address, x.mnemonic, x.op_str);
	}
}