Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

npm / yarn / pnpm

npm install laurus-wasm
# or
yarn add laurus-wasm
# or
pnpm add laurus-wasm

CDN (ES Module)

<script type="module">
  import init, { Index, Schema } from 'https://unpkg.com/laurus-wasm/laurus_wasm.js';
  await init();
  // ...
</script>

Build from Source

Prerequisites:

git clone https://github.com/mosuka/laurus.git
cd laurus/laurus-wasm

# For use with bundlers (webpack, vite, etc.)
wasm-pack build --target bundler --release

# For direct browser use (<script type="module">)
wasm-pack build --target web --release

The output will be in the pkg/ directory.

Browser Compatibility

laurus-wasm requires a browser that supports:

  • WebAssembly (all modern browsers)
  • ES Modules

For OPFS persistence, the following browsers are supported:

BrowserMinimum Version
Chrome102+
Firefox111+
Safari15.2+
Edge102+