Code search that ranks like code: definitions above usages, widely imported files first, from an in-memory trigram index.
Trigram indexing · Tree-sitter symbol awareness · Millisecond search · gRPC + REST APIs
Choose the right tool for the query — or use both together
Trigram-indexed, AST-aware search. Zero cold-start. Best for exact code patterns, function calls, and variable names.
fn main · class.*Handler · import useState
Understands code meaning. Best for natural language queries that don't map to exact token matches.
"retry with exponential backoff" · "validate user input"
Unlike CLI tools or disk-based indexes, it runs as an always-on, in-memory server
The index stays hot in RAM, so a query never waits on disk: about 1 ms at the median over tokio + Django in CI, and microseconds when nothing matches.
Definitions outrank usages, files the codebase imports outrank the ones it doesn't, phrases outrank scattered terms, and references (call sites, type mentions) are a first-class query.
Tree-sitter parses Rust, Python, JS/TS, Go, C/C++, Java, C#, Ruby, PHP, Bash and more.
gRPC streaming (tonic) for IDE plugins. REST/JSON (axum) for scripts and web UIs.
Symbol defs (3×), exact match (2×), src/lib dirs (1.5×), PageRank import boost.
File watcher tracks filesystem changes. Incremental re-indexing keeps the index fresh.
Save the full index (v3 format with symbols & deps) to disk. Checkpoints during large builds.
Browser-based search on port 8080. Static assets compiled into the binary — zero deployment friction.
Tested on every push and pull request across Linux, Windows, and macOS
| Suite | ubuntu-latest | windows-latest | macos-latest |
|---|---|---|---|
cargo build |
✅ | ✅ | ✅ |
cargo test |
✅ | ✅ | ✅ |
cargo clippy |
✅ | — | — |
cargo fmt |
✅ | — | — |
cargo llvm-cov |
✅ | — | — |
validator --json |
✅ | — | — |
Status is updated on every push to main.
View full run history →
Criterion benchmarks tracked over time — historical trend data powered by github-action-benchmark
From benchmark run 34254363545 (commit f46e7bf, GitHub-hosted ubuntu-latest); the README carries the full table.
Text search, regex search, filtered search across synthetic and real corpora. Measures throughput and latency percentiles.
Save/load index, trigram deserialization, file staleness checks. Validates startup time at scale.
200-file synthetic corpus. Verifies index completeness, line number accuracy, symbol extraction, path filtering, and query correctness.
Open full benchmark dashboard in new tab → | Latest benchmark run →
Generated via cargo-llvm-cov on every CI run
# Install (one-time)
cargo install cargo-llvm-cov
rustup component add llvm-tools-preview
# Generate HTML report and open it
cargo llvm-cov --all-features --workspace --open
# Generate LCOV for IDE integration
cargo llvm-cov --all-features --workspace \
--lcov --output-path lcov.info
HTML reports are also available as a coverage-report artifact on each
CI run.
Version bump and release.
Automated performance benchmarks in CI with historical trend tracking. Registered persistence_benchmark in Cargo.toml.
Code coverage via cargo-llvm-cov. Fixed API handlers blocking under concurrent load (503 instead of deadlock).
Fixed OOM during large-codebase indexing: compact_memory(), finalize() shrink-to-fit, TrigramIndex::finalize().
Fixed content_fallback bytes permanently retained in heap. Persist symbol caches and import graph in saved index (format v3).
git clone https://github.com/jburrow/fast_code_search.git
cd fast_code_search
cargo build --release
# Generate a default config file
./target/release/fast_code_search_server --init config.toml
# Edit to point at your codebase
# [indexer]
# paths = ["/path/to/your/repo"]
./target/release/fast_code_search_server --config config.toml
# Web UI available at http://localhost:8080
# gRPC available at localhost:50051
# REST API
curl "http://localhost:8080/api/search?q=fn+main&max=10"
# Symbols only
curl "http://localhost:8080/api/search?q=SearchEngine&symbols=true"
# Regex
curl "http://localhost:8080/api/search?q=async+fn.*Handler®ex=true"