Semble is a code search library built for agents, now 100% ported to Rust for maximum performance and a sub-millisecond local retrieval experience. It returns the exact code snippets agents need instantly, using ~98% fewer tokens than grep+read and cutting latency on every step. Everything runs completely locally with no external API dependencies.
The project has been rebuilt in Rust and is structured as a multi-crate workspace in semble-rs, divided into modular components:
parser-ast: Handles tree-sitter based code chunking, recursively splitting AST nodes to find optimal context boundaries.core-index: A hybrid retrieval engine utilizing BM25 (sparse) and high-performance vector operations for dense embeddings, implemented directly on arrays.cli-mcp: The core executable providing an async MCP server built ontokioandaxum, capable of running completely detached and exposing standard HTTP endpoints.
We believe in maximum stability and minimum bloat. Semble follows a strict zero-dependency philosophy where possible, relying entirely on the Rust standard library and a carefully curated list of high-performance primitives:
rayonfor parallelizationtree-sitterfor AST parsingndarrayfor dense vector operationsmemmap2for zero-copy memory mappingsafetensorsfor model loadingtokio/axumfor async networking and the MCP server.
We never include heavy, monolithic libraries or network dependencies for external inference. Memory sizes are always documented in bytes, and latency in ns/ms, strictly adhering to our metric compliance.
Semble exposes an OpenAI API-compatible endpoint out of the box so that any tool that can query chat/completions can seamlessly fetch relevant context chunks directly from your repository.
Run the server via:
cd semble-rs
cargo run -p cli-mcpThis starts an Axum server on port 3000. You can query it via standard HTTP requests:
curl http://localhost:3000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "semble-search",
"messages": [{"role": "user", "content": "How is authentication handled?"}]
}'The response provides mocked model completions mapped internally to high-fidelity BM25 and dense retrieval results from your codebase.
