ddc_dex/lib.rs
1//! ddc-dex — DEX container parsing and Dalvik instruction decoding.
2//!
3//! Pure, allocation-light, read-only access to a `.dex` image:
4//! * [`DexFile`] walks the header, id tables, class defs, code items and
5//! annotations lazily (indices resolved on demand, strings cached).
6//! * [`insn`] decodes Dalvik instructions in all formats plus the three
7//! payload pseudo-instructions.
8//!
9//! The decompiler front-end lives in `ddc-dec`; this crate only turns bytes
10//! into a structured view, never fails hard on malformed regions (accessors
11//! return `None` / `u32::MAX` sentinels).
12
13pub mod annotations;
14pub mod code;
15pub mod insn;
16pub mod reader;
17
18pub use code::{CatchHandler, CodeItem, TryItem};
19pub use file::{ClassData, EncodedField, EncodedMethod};
20
21mod file;
22pub use file::{ClassDef, DexFile, FieldId, MethodId, ProtoId, NO_INDEX};
23
24pub const DEX_HEADER_SIZE: usize = 0x70;