Thank you for your interest in contributing to
@stll/fuzzy-search.
All contributors must sign the Contributor License Agreement. You will be prompted automatically when you open a pull request.
# Prerequisites: Rust toolchain, Bun
bun install
bun run build # native module
bun test # run tests
bun run lint # oxlint
bun run format # oxfmt + rustfmtThe package ships native binaries for each platform as
optional npm sub-packages (npm/<target>/). On install,
npm/bun only downloads the binary matching the host platform.
The generated N-API loader is checked in as index.cjs.
Browser/WASM support is published as a separate package,
@stll/fuzzy-search-wasm (source in wasm/package.json).
Its entry point is wasm/dist/wasm.mjs, which imports from
@stll/fuzzy-search-wasm32-wasi. The root tsdown config
builds both the main package (to dist/) and the WASM
package (to wasm/dist/).
# Requires: wasm32-wasip1-threads Rust target
rustup target add wasm32-wasip1-threads
bun run build:wasm
# Place artifacts into sub-packages
bun x @napi-rs/cli artifactsThe build:wasm script uses --platform so the output is named
fuzzy-search.wasm32-wasi.wasm (matching the napi target
convention). napi artifacts then moves all generated files
into the correct npm/ sub-packages automatically.
- One logical change per PR.
- Include tests for bug fixes and new features.
- Run
bun test && bun run lint && bun run formatbefore submitting. - Use Conventional Commits:
feat:,fix:,chore:,docs:. - Squash merge is enforced; keep the PR title clean.
If your change affects performance, include benchmark results:
bun run bench:install # one-time
bun run bench:download # one-time
bun run bench:correctness
bun run bench:speedOpen a GitHub issue. For security vulnerabilities, see SECURITY.md.