Laurus WASM Samples

Browser-side search built on the laurus-wasm package (Rust → WebAssembly). Each sample below boots the engine directly from ../pkg/, persists data in OPFS, and ships its own UI.

Available samples

How to run locally

Each sample loads ../pkg/laurus_wasm.js and ../pkg/opfs.js, so you have to build the WASM package first. The browser also needs HTTP — opening the HTML with file:// will not work.

cd laurus-wasm
wasm-pack build --target web --dev
./scripts/postbuild.sh

# Place the UniDic zip at examples/dict/lindera-unidic.zip
# (the deploy workflow does this for the published demo).

python3 -m http.server 8080
# Then open http://localhost:8080/examples/ in your browser.

Layout

Shared assets live in shared/ and are imported by every sample with relative paths (../shared/...). The UniDic zip is fetched from ../dict/lindera-unidic.zip so all samples share a single OPFS-cached dictionary.