Skip to main content

Crate rsleigh_api

Crate rsleigh_api 

Source
Expand description

Spectra integration API for rsleigh.

Provides a unified Decoder interface across all supported architectures, managing context/global-set lifecycle and returning optimized P-code.

§Usage

use rsleigh_api::{Decoder, Architecture};

let mut decoder = Decoder::new(Architecture::X86_64);
let inst = decoder.decode(&[0x48, 0x89, 0xd8], 0x1000).unwrap();
assert_eq!(inst.disassembly, "MOV RAX,RBX");
assert_eq!(inst.len, 3);

§Stability

This crate is the stable entry point for embedding rsleigh as a decoder/lifter. Audit P2 #2: the surface listed below is covered by semver and changes go through deprecation; everything outside this list (the rsleigh-decompile analysis crate, the rsleigh-cli binary, signature/FID heuristics, printer text rewrites) is experimental and may change without notice.

Stable surface:

Anything else in this crate (helper functions, internal context types, generated-crate re-exports) is implementation detail. rsleigh_decompile::*, rsleigh_decompile::printer::*, rsleigh_decompile::fold::*, etc. are not covered by this stability promise — pin a specific patch version if you depend on their shape.

Structs§

Decoder
Unified instruction decoder.
Instruction
A decoded and lifted instruction.
Varnode
A triple (space, offset, size) identifying a storage location or constant.

Enums§

AddressSpaceId
Identifies an address space in the P-code model.
Architecture
Supported CPU architectures.
DecodeError
Decode error returned when an instruction cannot be parsed.
PcodeOp
A single P-code operation.