Skip to main content

Crate ruvector_typesafe_ffi

Crate ruvector_typesafe_ffi 

Source
Expand description

napi-rs surface for @ruvector/typesafe. Decisions run synchronously via decideJson and asynchronously as an AsyncTask via decide (ADR-002 §4); the JSON contract is ruvector_typesafe_core::types.

Error discipline (spec + ADR-005): request-level failures never throw across the boundary — they are returned as {"error":{"kind":"limit"|"invalid"| "embedder","message":"..."}}. Only programmer errors (malformed options JSON, unsupported embedder, an onnx model that fails to load) throw a JS Error.

Structs§

DecideTask
The off-thread half of Engine::decide.
Engine
A compiled decision engine. train needs &mut, hence the RwLock; the Arc lets the async path hand a clone to the libuv thread pool.

Functions§

version
Crate (== Cargo workspace) version. Mirrors the router binding’s version().