binbun-x86 0.1.0

x86 and x86-64 instruction decoder generated from Intel XED's datafiles.
Documentation
  • Coverage
  • 100%
    12360 out of 12360 items documented1 out of 2 items with examples
  • Size
  • Source code size: 18.0 MB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 64.4 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • dmaivel/binbun
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dmaivel

binbun-x86

An x86 and x86-64 instruction decoder, generated from Intel XED's datafiles: 16-, 32- and 64-bit modes, operands with their access, implicit registers, flag effects, control flow, and Intel-syntax text. It is the x86 disassembler of binbun, usable on its own.

use binbun_x86::{Decoder, Mode};

let code = [0x55, 0x48, 0x89, 0xe5, 0x31, 0xc0, 0x5d, 0xc3];
for (address, decoded) in Decoder::new(&code, Mode::Bits64, 0x40_1000) {
    match decoded {
        Ok(insn) => println!("{address:#x}  {}", insn.intel(address)),
        Err(error) => println!("{address:#x}  (bad: {error})"),
    }
}

For x86 and AArch64 through one API, see binbun-disasm. More examples are in the repository.

Licensed under either of Apache License, Version 2.0 or MIT license at your option, except the code generated from Intel XED, which is under XED's Apache License, Version 2.0 (LICENSE-XED).