Chub — a Rust implementation of Context Hub with format compatibility
Hi team,
First — thanks for building Context Hub. The concept of curated, versioned API docs served to AI agents is genuinely useful, and we've been relying on it in our workflows.
We wanted to share that we've built Chub - https://chub.nrl.ai, a Rust rewrite of Context Hub that maintains full format compatibility while extending it with team collaboration features. We thought the community might find it useful, and we'd love your feedback.
What it is
Chub is a drop-in alternative — it reads and writes the same registry.json, search-index.json, and annotation formats. Content authored for Context Hub works in Chub without changes and vice versa. The BM25 scoring, tokenization, stop words, and lexical boost logic are all ported to produce identical search rankings (verified with automated parity tests).
Performance
Benchmarked on the production corpus (1,553 docs), release build vs Node.js v22:
| Operation | Context Hub | Chub | Speedup |
|---|---|---|---|
search "stripe payments" |
1,060 ms | 56 ms | 19x |
build --validate-only |
1,920 ms | 380 ms | 5x |
get stripe/api |
148 ms | 63 ms | 2.3x |
| Cold start | 131 ms | 44 ms | 3x |
| Peak memory (build) | ~122 MB | ~23 MB | 5.3x less |
Ships as a single 10 MB binary with no runtime dependencies.
Added features (all additive, nothing removed)
- Doc pinning (
pins.yaml) — lock doc versions across a team, tracked in git - Context profiles — role-scoped context (backend, frontend, etc.) with inheritance
- Team annotations — git-tracked notes, issues, fixes, and best practices on any doc
- Dependency auto-detection — scan package managers and suggest matching docs
- Agent config sync — generate CLAUDE.md, .cursorrules, AGENTS.md from a single source
- Project context — custom markdown docs in
.chub/context/served via MCP - 7 MCP tools (vs 5) — adds
chub_contextandchub_pins - 20 CLI commands (vs 7)
Why we're posting
We're not trying to fragment the ecosystem. A few things we'd genuinely appreciate input on:
- Content registry — we currently point to the same CDN. Would there be interest in coordinating on registry updates or accepting contributions to the content corpus?
- Format evolution — if there are plans to change
registry.jsonorsearch-index.jsonschemas, we'd like to stay in sync. - Feature backport interest — if any of the team features (pinning, profiles, annotations) seem useful for the JS version, we're happy to discuss design or contribute.
We've documented the compatibility surface in detail: compatibility.md and chub-vs-context-hub.md.
Thanks again for the project — happy to answer any questions.
Source: andrewyng/context-hub