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

インストール

npm から

npm install laurus-nodejs

ソースから

ソースからビルドするには Rust ツールチェーン(1.85 以降)と Node.js 18 以上が必要です。

# リポジトリをクローン
git clone https://github.com/mosuka/laurus.git
cd laurus/laurus-nodejs

# 依存パッケージのインストール
npm install

# ネイティブモジュールのビルド(リリース)
npm run build

# デバッグモード(ビルドが速い)
npm run build:debug

確認

import { Index } from "laurus-nodejs";
const index = await Index.create();
console.log(index.stats());
// { documentCount: 0, vectorFields: {} }

要件

  • Node.js 18 以上
  • コンパイル済みネイティブアドオン以外のランタイム依存なし