Rust workspace for a staged port of github.com/sourcegraph/zoekt.
The current workspace includes:
- shared search, repository, and result models,
- a query parser and normalizer,
- language detection via
linguist, - an in-memory trigram-backed index and sharded searcher,
- persisted shard read/write support with mmap-backed loading,
- reloadable directory-backed shard search,
- local directory, git/worktree, and archive ingestion,
- a pure JSON HTTP API,
- a separate HTML demo UI,
- unit tests plus criterion benchmarks,
- architecture and parity-planning docs in
docs/.
From the root of the repository you want to search, run:
cargo run -p zoekt-demo-cliThat command:
- indexes the current working directory,
- writes a temporary shard,
- starts a demo server at
http://127.0.0.1:6080, - serves an HTML search UI at
/, - keeps the JSON API available at
/api/search.
If you want the shard files to persist:
cargo run -p zoekt-demo-cli -- --output-dir ./.zoekt-demoThe production-style web server stays data-only. It does not serve the HTML UI.
To index the current repository and run the pure JSON server in one shell line:
cargo run -p zoekt-index-cli -- . --output-dir ./.zoekt-demo && cargo run -p zoekt-webserver-cli -- --path ./.zoekt-demoUseful endpoints:
http://127.0.0.1:6070/healthzhttp://127.0.0.1:6070/api/search?q=alphahttp://127.0.0.1:6070/api/search?q=type%3Afilename%20alphahttp://127.0.0.1:6070/api/search?q=type%3Afilematch%20alphahttp://127.0.0.1:6070/api/search?q=sym%3Arouterhttp://127.0.0.1:6070/api/search?q=file%3AREADME
crates/zoekt-web: JSON API only.crates/zoekt-web-ui: HTML rendering for search pages.apps/zoekt-webserver: data-only server aroundzoekt-web.apps/zoekt-demo: one-command demo app that composes the UI and JSON API.
This is still a vertical slice rather than full Zoekt parity. The detailed audit and staged Rust port plan live in docs/architecture-analysis.md and docs/rust-port-plan.md.