📦 TypeScript Binding — Overview
The TypeScript binding is the primary, first-class way to drive Vulfram from application code. It exposes a clean, typed API that mirrors the core concepts (worlds, entities, resources, commands) without forcing you to deal with the low-level C-ABI details directly.
Our focus for the binding is TypeScript. If the community wants to build bindings for Lua, Python, or any other language in the future, feel free — the core C-ABI is designed for that.
What the TypeScript Binding Gives You
- A clear, idiomatic TypeScript API for creating windows, resources, and entities
- Internally managed MessagePack serialization and command batching
- Typed payloads for commands, responses, and events
- A small set of primitives to build your own ECS or gameplay layer on top
Architecture in One Paragraph
You initialize the engine with a transport (WASM, Bun FFI, or N-API). The engine maintains an internal world state and processes intents every frame. Those intents become core commands, serialized into a MessagePack batch and sent to the native core. Events and responses come back from the core and are routed to the correct world on the next tick.
Suggested Reading Order
- Setup — install packages and pick a transport
- Core API Map — how TS functions map to core commands
- Examples — minimal app, WASM browser demo, input loop
- Troubleshooting — common errors and fixes
Status
The binding is already functional and used by our demos. Documentation will keep expanding as the API stabilizes.