Skip to content

KonradStanski/zoekt-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zoekt-rs

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/.

Current Repo Demo

From the root of the repository you want to search, run:

cargo run -p zoekt-demo-cli

That 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-demo

Pure Data Server

The 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-demo

Useful endpoints:

  • http://127.0.0.1:6070/healthz
  • http://127.0.0.1:6070/api/search?q=alpha
  • http://127.0.0.1:6070/api/search?q=type%3Afilename%20alpha
  • http://127.0.0.1:6070/api/search?q=type%3Afilematch%20alpha
  • http://127.0.0.1:6070/api/search?q=sym%3Arouter
  • http://127.0.0.1:6070/api/search?q=file%3AREADME

Workspace Split

  • crates/zoekt-web: JSON API only.
  • crates/zoekt-web-ui: HTML rendering for search pages.
  • apps/zoekt-webserver: data-only server around zoekt-web.
  • apps/zoekt-demo: one-command demo app that composes the UI and JSON API.

Status

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages