13 unstable releases (5 breaking)

0.10.0 Jul 4, 2025
0.9.0 Nov 11, 2024
0.8.0 Jul 30, 2024
0.7.2 May 8, 2024
0.5.0-alpha.4 Sep 18, 2022

#199 in Encoding

Download history 47855/week @ 2025-10-09 51166/week @ 2025-10-16 51939/week @ 2025-10-23 50991/week @ 2025-10-30 53670/week @ 2025-11-06 53729/week @ 2025-11-13 55012/week @ 2025-11-20 55156/week @ 2025-11-27 55579/week @ 2025-12-04 55348/week @ 2025-12-11 50150/week @ 2025-12-18 46539/week @ 2025-12-25 59610/week @ 2026-01-01 66503/week @ 2026-01-08 66133/week @ 2026-01-15 73242/week @ 2026-01-22

273,419 downloads per month
Used in 5 crates (4 directly)

MIT/Apache

30KB
381 lines

High-level crate to extract the dependency trees embedded in binaries by cargo auditable.

Deserializes them to a JSON string or Rust data structures, at your option.

Features

  • Binary parsing designed from the ground up for resilience to malicious inputs.
  • 100% memory-safe Rust, including all dependencies. (There is some unsafe in serde_json and its dependencies, but only in serialization, which isn't used here).
  • Cross-platform, portable, easy to cross-compile. Runs on any Rust target with std.
  • Parses binaries from any supported platform, not just the platform it's running on.
  • Supports setting size limits for both input and output, to protect against OOMs and zip bombs.

Usage

// Uses the default limits: 1GiB input file size, 8MiB audit data size
let info = audit_info_from_file(&PathBuf::from("path/to/file"), Default::default())?;

Functions to load the data from a Read instance or from &[u8] are also provided, see the documentation.

Alternatives

rust-audit-info is a command-line interface to this crate.

If you need a lower-level interface than the one provided by this crate, use the auditable-extract and auditable-serde crates.

Dependencies

~0.3–0.9MB
~17K SLoC