werk

@nerve/search (1.0.0)

Published 2026-07-26 20:21:11 +02:00 by amelie

Installation

@nerve:registry=https://gitlab.amandy.love/api/packages/werk/npm/
npm install @nerve/search@1.0.0
"@nerve/search": "1.0.0"

About this package

Nerve Search (FFI Adapter)

This package contains the Bun FFI wrapper and NerveAdapter for the nerve-core Rust engine.

Installation for Superbun

In superbun/package.json, add the dependency:

{
  "dependencies": {
    "@nerve/search": "workspace:*"
  }
}

Then in superbun/src/Database/NerveAdapter.ts (or wherever it is used):

import { NerveAdapter, NerveMatch } from "@nerve/search";

const adapter = new NerveAdapter("db/ai");
const results = adapter.search(["keyword"], [], 10); // Now supports configurable top-K

Features added:

  • Configurable topK in search(keywords, exclude, topK)
  • Lowercase keyword normalization by default
  • Atomic writes for sorted.bin merging
  • Fixed log format mismatch

Dependencies

Development Dependencies

ID Version
@types/bun latest
@types/node ^25.6.0
Details
npm
2026-07-26 20:21:11 +02:00
3
latest
6.5 KiB
Assets (1)
Versions (1) View all
1.0.0 2026-07-26