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.
| Language | Package | Import | Source |
|---|---|---|---|
| Python | baseRT |
import baseRT |
bindings/python |
| Node | @baseRT/node |
import { BaseRTModel } |
bindings/node |
| Rust | baseRT |
use baseRT::… |
bindings/rust |
| Swift | BaseRT |
import BaseRT |
bindings/swift |
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:
| Variable | Used by |
|---|---|
BASERT_LIB_PATH |
Python, Node |
BASERT_LIB_DIR |
Rust, Swift |
The dylib carries the Metal kernels and its own framework/C++ dependencies, so it's a single redistributable artifact across every binding.
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.