Bindings

BaseRT exposes a stable C API (include/baseRT/baseRT.h) and ships idiomatic wrappers for four languages. All of them link the single libbaseRT.dylib (Metal kernels embedded) — no separate .metallib to manage.

LanguagePackageImportSource
PythonbaseRTimport baseRTbindings/python
Node@baseRT/nodeimport { BaseRTModel }bindings/node
RustbaseRTuse baseRT::…bindings/rust
SwiftBaseRTimport BaseRTbindings/swift

Finding the engine

Each binding needs to locate libbaseRT.dylib at runtime. Unpack an engine release into build/ at the repo root (the default search path) or set:

VariableUsed by
BASERT_LIB_PATHPython, Node
BASERT_LIB_DIRRust, Swift

The dylib carries the Metal kernels and its own framework/C++ dependencies, so it's a single redistributable artifact across every binding.

Shared model

All bindings load the same .base files you produce with basert pull / basert convert, and expose the same primitives: encode/decode, prefill, single or streaming generation, embeddings, chat-template formatting, and (for Whisper-class models) transcription.