wickra-genome
v0.1.4
Published
A vector database of the market: every asset a live vector over the streaming indicators, with similarity, clustering and anomaly detection. Node.js bindings powered by Rust.
Maintainers
Readme
Wickra Genome — Node.js
Part of the Wickra ecosystem: — for Node.js. npm install wickra-genome — prebuilt native binary, no system dependencies.
Node.js bindings for the Wickra Genome vector engine, built with napi-rs. A
Genome handle is driven over a JSON boundary, so the same commands yield the
byte-identical similarity, clustering and anomaly results as every other Wickra
Genome binding.
Install
npm install wickra-genomeThe native addon ships as a prebuilt binary per platform (Linux, macOS, Windows — x64 and arm64), selected automatically through optional dependencies. There is nothing to compile.
Building from this repository (contributors)
npm install
npm run build
npm testQuick start
const { Genome } = require("wickra-genome");
const spec = {
features: [{ kind: "price", field: "close" }],
symbols: ["AAA", "BBB", "CCC"],
normalize: "z_score",
metric: "euclid",
seed: 24333,
};
const g = new Genome(JSON.stringify(spec));
const data = {
AAA: [{ time: 0, open: 1, high: 1, low: 1, close: 1, volume: 0 }],
BBB: [{ time: 0, open: 2, high: 2, low: 2, close: 2, volume: 0 }],
CCC: [{ time: 0, open: 100, high: 100, low: 100, close: 100, volume: 0 }],
};
g.command(JSON.stringify({ cmd: "build", data }));
console.log(g.command(JSON.stringify({ cmd: "similar", symbol: "AAA", k: 2 })));
console.log(g.command(JSON.stringify({ cmd: "anomaly" })));The command protocol (build, feed, vector, similar, cluster,
anomaly, version) is identical across every binding; only the Rust core
computes, so a fixed seed gives the byte-identical clustering everywhere.
Benchmark
Every binding forwards to the same data-driven Rust core, so what this one adds is
the call overhead of napi-rs, not a different result. The core's throughput is
measured by the repository's benchmark suite and the nightly bench.yml run; the
numbers, the machine and how to reproduce them are in the repository
BENCHMARKS.md.
Documentation
The full guide, the spec reference and the API documentation live in the main repository and the documentation site:
- Repository: https://github.com/wickra-lib/wickra-genome
- Docs (guides, spec reference, cookbook): https://genome.wickra.org
- Runnable example:
examples/node/
Wickra Genome ships native bindings for Python, Node.js, WASM and Rust, plus a C ABI hub that any
C-capable language (C, C++, C#, Go, Java, R) links against — all forwarding to the
same data-driven, unsafe-forbidden Rust core.
Security
Found a security issue? Please don't open a public issue. Report it privately
via the repository's Security tab ("Report a vulnerability") or email
[email protected] with a subject line starting [wickra security]. Full
policy: https://github.com/wickra-lib/wickra-genome/blob/main/SECURITY.md.
Disclaimer
Wickra Genome is research and analytics software. Its similarity, clustering and anomaly outputs are not investment advice, and nothing here is a recommendation to trade. Use at your own risk.
License
Licensed under either of Apache-2.0 or MIT at your option.
