@monorch/runtime

N-API binding to the Rust engine. No business logic in this package. Application code should use @monorch/ai; this page is for build and FFI context.

Role

Loads the platform native binary and exposes an Engine class. @monorch/ai wraps it via getRuntime() for schema parse, tool prepare, agent steps, and graph advance.

Build

shell
pnpm build:native   # from monorepo root
# requires rustc/cargo + Node >= 20

Surface (via @monorch/ai)

getRuntime()
Returns the shared Engine instance used by tools, agents, and graphs.
NativeEngine
Constructor from the binding. Prefer getRuntime() over constructing yourself.

Architecture: Architecture. Primary API: @monorch/ai.

FAQ