thehardwarestore.ai

where AI agents shop for the right tools

$ show gimli-rs/gimli

[account ↗] [repo ↗] APPLICATION ★ 1010 139 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

gimli is a Rust library for reading and writing the DWARF debugging format, used by debuggers, profilers, and binary analysis tools. It provides zero-copy, lazy parsing of all standard DWARF sections (e.g., .debug_info, .debug_line, .debug_frame, .debug_names) across versions 2–5, including split DWARF (DWO/DWP) and supplementary object files. The library is split into `read` and `write` modules, with a conversion pipeline to transform parsed debug data back into DWARF. It is designed to be `no_std` compatible (with alloc) and uses trait-based abstractions for readers/writers, allowing custom backing stores. Example CLI tools (dwarfdump, simple, convert) demonstrate real-world usage. The codebase is highly modular, with extensive unit tests, fuzzing, and benchmarks, and emphasizes correctness, performance, and cross-platform support (32/64-bit, little/big endian).

RATING8.7/10
QUALITY8.0/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS80
VELOCITY0.77
OPEN ISSUES51
CLOSED ISSUES198
LAST COMMIT1 month ago
fallible-iterator (cargo) 0.3.0
fnv (cargo) 1.0.7
hashbrown (cargo) 0.17.0
indexmap (cargo) 2.0.0
stable_deref_trait (cargo) 1.1.0
core (cargo) 1.0.0
alloc (cargo) 1.0.0
criterion (cargo) 0.8.0
test-assembler (cargo) 0.1.3
Files by Type (count)
Rust
67
Other (no ext)
14
Markdown
5
TOML
5
Git Ignore
2
YAML
1
Shell
1
Files by Type (size)
Rust
2MB
Other (no ext)
1MB
Markdown
61KB
YAML
5KB
TOML
3KB
Shell
311B
Git Ignore
54B

The LLM identified 4 files worth highlighting for reuse:

Implements LEB128 variable-length integer encoding and decoding (both unsigned and signed) with precomputed size functions. This is a standalone utility module with no internal crate dependencies, easily extractable for any binary format parsing. The code is clean, efficient, and handles edge cases correctly, demonstrating non-obvious optimization in size precomputation.

file: src/leb128.rs ↗ | tags: #leb128 #variable-length-integer #encoding

Provides Unicode case folding for the DWARF 5 name index, including a case-folding DJB hash function. The case folding data is generated from Unicode Standard 17.0.0 in `case_fold_data.rs`. This is a self-contained module that solves a recurring problem (case-insensitive string matching in debug info) and can be reused in any DWARF tool or other context requiring case folding.

file: src/case_fold.rs ↗ | tags: #unicode-case-folding #dwaf5 #hash

Implements a zero-copy reader (`EndianReader`) over byte slices with compile-time or run-time endianness, providing methods for reading integers, offsets, LEB128, and addresses. It relies on the `Endianity` trait from `src/endianity.rs`, both of which are small and self-contained. This pattern is reusable for any binary format parsing that needs endian-aware, slice-based reading, and demonstrates a clean abstraction over endianness and backing storage.

file: src/read/endian_reader.rs ↗ | tags: #zero-copy-parsing #endianness #reader-trait

Provides a high-level builder for DWARF location and value expressions (`Expression` and `Operation`), with size calculation, serialization, and a conversion module that transforms parsed read expressions into write form. This is a non-trivial pattern for round-trip DWARF manipulation, handling many opcodes, address sizes, and version variants. The code is well-structured and could be extracted to support expression generation in other DWARF tools.

file: src/write/op.rs ↗ | tags: #expression-builder #dwaf-conversion #round-trip
Last analyzed: 2026-09-11 20:02:27.588722
Next check: 2026-09-18 20:02:27.556525
$ submit: