[package]
name = "smda"
description = "Recursive x86/x64/AArch64 disassembler library for control-flow recovery from memory dumps. Iced-x86 + disarm64-backed; zero-copy."
version = "0.6.3"
authors = ["Marirs <marirs@gmail.com>", "Andrey Mnatsakanov <andrey@3ig.kiev.ua>", "Jorge Alejandro Durán Royo<jorge.duran.royo@gmail.com>"]
keywords = ["smda", "disassembler", "cfg", "iced", "aarch64"]
categories = ["parsing", "development-tools::debugging"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/marirs/smda-rs"
homepage = "https://github.com/marirs/smda-rs"
include = ["assets", "src", "examples", "LICENSE", "README.md", "CHANGELOG.md"]
edition = "2024"
rust-version = "1.95"

[dependencies]
# Decoder. Pure Rust, ~2-3× faster than capstone, exposes typed operands.
# We only need decode + Intel formatter + instruction-info (reg reads/writes).
iced-x86 = { version = "1", default-features = false, features = ["std", "decoder", "intel", "instr_info"] }
# goblin: PE + ELF parsers. We use `goblin::Object::parse` which requires
# all formats (mach/archive/te) gated together, so keep goblin's defaults.
goblin = { version = "0.10", features = ["alloc"] }
hex = "0.4"
itertools = "0.14"
maplit = "1"
# regex::bytes used to scan binary buffers for x86 function prologues.
# fancy-regex has no bytes mode so SBOM consolidation with capa-rs isn't possible here.
regex = "1"
# Rust symbol demangling — legacy (_ZN…) + v0 (_R…). Tiny crate, no transitive
# deps. 0.4.2 (N3).
rustc-demangle = "0.1"
# DWARF parser — used to recover function names from MinGW-GCC PE binaries
# that carry .debug_info / .debug_str. Pure Rust, alloc-only.
# 0.4.2 (MinGW DWARF).
gimli = { version = "0.32", default-features = false, features = ["read", "std"] }
# Lightweight pure-Rust SHA-256 (replaces the much heavier `ring`, which was
# used for a single hash of the input buffer).
sha2 = { version = "0.10", default-features = false }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "2"

# 0.6.0: disarm64 is now the AArch64 backend behind the Decoder trait.
# Pure Rust, MIT-licensed, table-generated from the ARM ISA JSON. The
# probe under examples/aarch64_probe.rs validated >95% clean memory-
# operand recovery on real Apple-silicon and Linux ARM64 binaries before
# we committed to the integration.
disarm64 = "0.1"
# Trait crate shared by disarm64's variant tables. Imported so we can
# reach `InsnOpcode::bits()` — the raw 32-bit instruction word — for
# AArch64 branch-target resolution in `disassembler::mod`. Already a
# transitive dep of disarm64; pinning it here keeps the import direct
# and resolver-stable. `default-features = false` matches disarm64's
# own dep so we don't pull in the no_std-incompatible features.
disarm64_defn = { version = "0.1", default-features = false }

[lib]
name = "smda"
path = "src/lib.rs"

[profile.dev]
opt-level = 3

[profile.release]
codegen-units = 1
debug-assertions = false
debug = false
opt-level = 3
lto = true
