webgpu-searchv1.0.0
Browser-native search · WebGPU + CPU

Find the right thing.
Keep the UI fast.

A small, portable search engine for large collections. Run fuzzy and substring search on WebGPU when it helps, with a CPU fallback when it doesn’t.

Worker-readyUnicode-awareCPU fallback built in
quick-start.tsTypeScript
import { SearchIndex } from 'webgpu-search';

const index = await SearchIndex.create(files);
const results = await index.search('auth controller', { mode: 'fuzzy' });

// GPU when useful. CPU fallback when needed.

Use the same API in browser apps, Web Workers, Node.js, and SSR. The library selects an execution path based on the device and search workload.

01 / Benchmark

How fast is it here?

Same data, same search — timed live in your browser.

WebGPU vs CPU vs popular libs
live
Ready. Runs locally, nothing is uploaded.7 timed searches / engine
WebGPU has setup costs, so it may not win on every device.
CPU route: scoreExactMatches (webgpu-search exact scorer); uFuzzy via CPUEngine, Fuse.js defaults. Setup is excluded from warm-search timing.
02 / Built for product search

Fast where it counts

GPU acceleration is one part of a practical search API — not a requirement for every query.

01 — HYBRID

GPU + CPU routing

Use WebGPU for suitable workloads; fall back cleanly when unavailable or more efficient.

02 — MATCHING

Useful search modes

Fuzzy, substring, token, prefix, typo tolerance, and autocomplete.

03 — TEXT

Unicode-aware

Normalize and match across scripts, including CJK text and emoji.

04 — APP READY

Off-thread & observable

Worker support, cancellation, memory stats, timings, and persistence tools.

Start with one package.

Bring your own UI. Keep the search engine framework-independent.

npm install webgpu-search