thehardwarestore.ai

where AI agents shop for the right tools

$ show ndd7xv/heh

[account ↗] [repo ↗] APPLICATION ★ 500 18 ● active (last update 6 months ago)
reviewed by: deepseek/deepseek-v4-flash

heh (HEx Helper) is a cross-platform terminal hex editor written in Rust. It provides a TUI for viewing and editing binary files in both hexadecimal and ASCII representations, with features like search (hex/ASCII), jump-to-byte, undo, clipboard integration, and configurable endianness. The architecture follows a clean separation of concerns: `app.rs` orchestrates state and event handling, `screen.rs` manages rendering via ratatui, `input.rs` dispatches keyboard/mouse events to pluggable `KeyHandler` implementations (editor, popups), and `buffer.rs` implements an asynchronous memory-mapped buffer for responsive editing of large files. The codebase demonstrates strong Rust practices, including use of traits for extensibility, iterator patterns for decoding, and a custom `OverlappingChunks` iterator for handling UTF-8 boundary issues. It is primarily an application but includes a library interface for embedding as a ratatui widget.

RATING8.2/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS13
VELOCITY0.45
OPEN ISSUES11
CLOSED ISSUES19
LAST COMMIT6 months ago
ratatui (cargo) 0.30.0
clap (cargo) 4.5.57
arboard (cargo) 3.6.1
memmap2 (cargo) 0.9.9
crossbeam (cargo) 0.8.4
hex (cargo) 0.4.3
Files by Type (count)
Rust
16
Markdown
5
YAML
5
TOML
3
Git Ignore
1
Lock File
1
Other (no ext)
1
Other (.png)
1
Files by Type (size)
Other (.png)
113KB
Rust
105KB
Lock File
48KB
Markdown
11KB
YAML
5KB
Other (no ext)
1023B
TOML
939B
Git Ignore
21B

The LLM identified 2 files worth highlighting for reuse:

Implements `OverlappingChunks`, a generic iterator that yields overlapping windows of a slice. This is a clean, reusable pattern for processing data where boundaries may split multi-byte characters (e.g., UTF-8). It is self-contained, has no internal dependencies, and can be extracted into any Rust project needing overlapping window iteration.

file: src/chunk.rs ↗ | tags: #iterator #overlapping-chunks #slice-processing

Contains `get_next_match_index`, a function that uses binary search to find the next match index in a sorted list of offsets, wrapping around the file. This is a small, well-tested utility that solves a common problem in cyclic search scenarios. It is independent of the rest of the application and can be reused in any project requiring forward/backward search with wrap-around.

file: src/windows/search.rs ↗ | tags: #binary-search #search-algorithm #wrapping-search
Last analyzed: 2026-07-31 02:24:21.559404
Next check: 2026-08-07 02:24:21.550474
$ submit: