A high-performance document search engine built in Rust with WebAssembly support.
See the codeA high-performance document search engine built in Rust with WebAssembly support. Combines full-text search using FST (Finite State Transducers) with FSST compression for efficient storage and fast fuzzy matching capabilities.
Check out the interactive demo. The demo showcases docfind searching through 50,000 news articles from the AG News dataset, running entirely in your browser with WebAssembly.
Demo Performance Metrics:
macOS/Linux:
curl -fsSL https://microsoft.github.io/docfind/install.sh | sh
Windows (PowerShell):
irm https://microsoft.github.io/docfind/install.ps1 | iex
The installer will:
~/.local/bin (Unix) or ~\.docfind\bin (Windows)Download the binary for your platform from the latest release:
docfind-x86_64-apple-darwindocfind-aarch64-apple-darwindocfind-x86_64-unknown-linux-musldocfind-aarch64-unknown-linux-musldocfind-x86_64-pc-windows-msvc.exedocfind-aarch64-pc-windows-msvc.exeRename it to docfind (or docfind.exe on Windows), make it executable, and place it in your PATH.
Before building from source, ensure you have the following installed:
./scripts/build.sh
The compiled binary will be available at ./target/release/docfind.
Prepare a JSON file with your documents:
[
{
"title": "Getting Started",
"category": "docs",
"href": "/docs/getting-started",
"body": "This guide will help you get started."
},
{
"title": "API Reference",
"category": "reference",
"href": "/docs/api",
"body": "Complete API documentation for all search functions and configuration options."
}
]
Build the index and generate a WASM module:
docfind documents.json output
This creates:
output/docfind.js - JavaScript bindingsoutput/docfind_bg.wasm - WebAssembly module with embedded index<script type="module">
import search from 'docfind.js';
const documents = await search('needle');
console.log(documents);
</script>
flowchart LR
A([documents.json]) --> B[docfind]
B --> C[Keyword Extraction<br/>RAKE]
B --> E[FSST Compression<br/>document strings]
C --> D[FST Map<br/>keywords → docs]
D --> F[[Index]]
E --> F
F --> G([docfind_bg.wasm<br/>+ docfind.js])
style A fill:#e1f5ff
style G fill:#e1f5ff
style F fill:#ffffcc
Indexing Phase (CLI):
Embedding Phase (CLI):
INDEX_BASE, INDEX_LEN) with actual valuesSearch Phase (WASM):
The combination of FST and FSST provides:
This project builds on the rich ecosystem of search technologies:
Key technologies and concepts that inspired and power docfind:
(top 24 of 42)
975 followers · starred Dec 2025
336 followers · starred Dec 2025
223 followers · starred Dec 2025
567 followers · starred Jan 2026
A high-performance document search engine built in Rust with WebAssembly support.
See the codeA high-performance document search engine built in Rust with WebAssembly support. Combines full-text search using FST (Finite State Transducers) with FSST compression for efficient storage and fast fuzzy matching capabilities.
Check out the interactive demo. The demo showcases docfind searching through 50,000 news articles from the AG News dataset, running entirely in your browser with WebAssembly.
Demo Performance Metrics:
macOS/Linux:
curl -fsSL https://microsoft.github.io/docfind/install.sh | sh
Windows (PowerShell):
irm https://microsoft.github.io/docfind/install.ps1 | iex
The installer will:
~/.local/bin (Unix) or ~\.docfind\bin (Windows)Download the binary for your platform from the latest release:
docfind-x86_64-apple-darwindocfind-aarch64-apple-darwindocfind-x86_64-unknown-linux-musldocfind-aarch64-unknown-linux-musldocfind-x86_64-pc-windows-msvc.exedocfind-aarch64-pc-windows-msvc.exeRename it to docfind (or docfind.exe on Windows), make it executable, and place it in your PATH.
Before building from source, ensure you have the following installed:
./scripts/build.sh
The compiled binary will be available at ./target/release/docfind.
Prepare a JSON file with your documents:
[
{
"title": "Getting Started",
"category": "docs",
"href": "/docs/getting-started",
"body": "This guide will help you get started."
},
{
"title": "API Reference",
"category": "reference",
"href": "/docs/api",
"body": "Complete API documentation for all search functions and configuration options."
}
]
Build the index and generate a WASM module:
docfind documents.json output
This creates:
output/docfind.js - JavaScript bindingsoutput/docfind_bg.wasm - WebAssembly module with embedded index<script type="module">
import search from 'docfind.js';
const documents = await search('needle');
console.log(documents);
</script>
flowchart LR
A([documents.json]) --> B[docfind]
B --> C[Keyword Extraction<br/>RAKE]
B --> E[FSST Compression<br/>document strings]
C --> D[FST Map<br/>keywords → docs]
D --> F[[Index]]
E --> F
F --> G([docfind_bg.wasm<br/>+ docfind.js])
style A fill:#e1f5ff
style G fill:#e1f5ff
style F fill:#ffffcc
Indexing Phase (CLI):
Embedding Phase (CLI):
INDEX_BASE, INDEX_LEN) with actual valuesSearch Phase (WASM):
The combination of FST and FSST provides:
This project builds on the rich ecosystem of search technologies:
Key technologies and concepts that inspired and power docfind:
(top 24 of 42)
975 followers · starred Dec 2025
336 followers · starred Dec 2025
223 followers · starred Dec 2025
567 followers · starred Jan 2026