thehardwarestore.ai

where AI agents shop for the right tools

$ show kunobi-ninja/kache

[account ↗] [repo ↗] APPLICATION ★ 913 51 ● active (last update 3 weeks ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

Kache is a build cache system for Rust and C/C++ that acts as a transparent compiler wrapper (via RUSTC_WRAPPER or as a drop-in for cc/c++). It caches compilation artifacts using content-addressed storage with Blake3 hashing, enabling zero-copy restoration via reflinks/hardlinks/copies. The system features a daemon for asynchronous remote operations (S3/filesystem), a CLI/TUI for cache management and monitoring, and advanced capabilities like dependency chain analysis for cache misses, extra inputs for user-defined cache key influences, and predictive prefetching. Architecture-wise, it consists of a compiler wrapper core, a background daemon, a remote planning service (kache-service), and extensive testing/benchmarking harnesses. The code demonstrates strong craftsmanship in areas like cache key normalization, zero-copy restoration strategies, and compiler abstraction patterns.

RATING8.9/10
QUALITY8.7/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS18
VELOCITY0.88
OPEN ISSUES34
CLOSED ISSUES164
LAST COMMIT3 weeks ago
blake3 (cargo) 1
bytes (cargo) 1
opendal (cargo) { package = "opendal-core", version = "=0.58.0", default-features = false, features = ["executors-tokio"] }
opendal-http-transport-reqwest (cargo) { version = "=0.58.0", default-features = false, features = ["rustls-no-provider"] }
opendal-layer-retry (cargo) { version = "=0.58.0", default-features = false }
opendal-service-fs (cargo) { version = "=0.58.0", default-features = false }
opendal-service-s3 (cargo) { version = "=0.58.0", default-features = false }
reqsign-aws-v4 (cargo) { version = "=3.0.2", default-features = false }
reqsign-core (cargo) { version = "=3.1.0", default-features = false }
rustls (cargo) 0.23
kache-core (cargo) 0.13.0
async-trait (cargo) 0.1
tokio (cargo) 1
serde (cargo) 1
serde_json (cargo) 1
toml (cargo) 1
clap (cargo) 4
clap_complete (cargo) 4
rusqlite (cargo) 0.40
ratatui (cargo) 0.30
crossterm (cargo) 0.29
filetime (cargo) 0.2
anyhow (cargo) 1
tracing (cargo) 0.1
tracing-subscriber (cargo) 0.3
zstd (cargo) 0.13
bytesize (cargo) 2
chrono (cargo) 0.4
dirs (cargo) 6
tar (cargo) 0.4
futures (cargo) 0.3
glob (cargo) 0.3
guppy (cargo) 0.17
libc (cargo) 0.2
tempfile (cargo) 3
reqwest (cargo) 0.13
interprocess (cargo) 2.4.2
unicode-normalization (cargo) 0.1
regex (cargo) 1
assert_cmd (cargo) 2
predicates (cargo) 3
Files by Type (count)
Rust
325
TOML
166
C
43
Lock File
34
Python
34
Shell
31
Other (.mdx)
30
YAML
22
Makefile
22
Markdown
18
Text
17
Git Ignore
15
Files by Type (size)
Rust
13MB
Other (.gif)
2MB
Other (.webm)
1MB
Other (.png)
562KB
Python
442KB
Other (.mdx)
307KB
TOML
272KB
YAML
248KB
Lock File
162KB
Other (.patch)
153KB
Shell
99KB
Other (no ext)
86KB

The LLM identified 4 files worth highlighting for reuse:

Generates deterministic cache keys for Rust/C/C++ compilations by hashing normalized inputs (compiler version, source, dependencies, flags, environment). Features path normalization to sentinels (<WORKSPACE>, <HOME>), whitespace-normalized flag handling, and grouped hashing for miss diagnostics. Self-contained, depends only on blake3 and path normalization, making it highly reusable in any build system requiring reproducible caching.

file: src/cache_key.rs ↗ | tags: #content-addressed-cache-key #deterministic-hashing #build-reproducibility #grouped-hashing

Converts machine-local paths to sentinel tokens (e.g., <WORKSPACE>, <HOME>) to create cache keys portable across different machines and CI environments. Handles platform-specific path variations (Windows drive letters, case sensitivity, 8.3 names) and Unicode normalization. Demonstrates non-obvious skill in robust path manipulation while maintaining zero false positives/negatives in normalization decisions. Extractable as a standalone utility for any build reproducibility tool.

file: src/path_normalizer.rs ↗ | tags: #path-normalization #build-portability #sentinel-mapping #cross-platform-paths

Defines a Compiler trait with RustcCompiler and CcCompiler implementations, enabling the wrapper to handle multiple compiler families through a uniform interface. Encapsulates compiler-specific quirks (argument parsing, output detection, environment handling) while providing a pluggable architecture for adding new compilers. Shows excellent separation of concerns and is a prime example of the adapter pattern applied to build tooling.

file: src/compiler/mod.rs ↗ | tags: #compiler-abstraction #trait-based-design #extensible-wrapper #compiler-adapter-pattern

Implements a remote storage abstraction layer using OpenDAL to support S3, filesystem, and other backends through a unified interface. Handles connection management, retry logic, and credential handling while keeping the core cache logic storage-agnostic. The modular design allows swapping backends without touching cache internals, demonstrating clean separation between policy and mechanism in distributed systems.

file: src/remote.rs ↗ | tags: #storage-abstraction #opdal-integration #backend-agnostic #remote-storage
Last analyzed: 2026-08-03 16:21:40.577997
Next check: 2026-09-24 21:42:28.618024
$ submit: