Installation
Prerequisites
Section titled “Prerequisites”Before installing DownDraft Engine, ensure you have the following tools installed:
DownDraft uses Bun as its package manager and default JS runtime — apps execute against the native platform library via runtime-adapted FFI (bun:ffi under Bun). Node+tsx (koffi) and Deno (Deno.dlopen) are also supported hosts via draft dev --runtime=node|deno and as packaged runtimes via draft release --runtime=node|deno (linux), but Bun is required regardless for dependency installation (bun.lock), bun test, and as the packager’s own host.
curl -fsSL https://bun.sh/install | bashRust (optional, for native modules)
Section titled “Rust (optional, for native modules)”Rust is only needed if you’re building the platform or audio native libraries from source.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shGet the Source
Section titled “Get the Source”git clone https://github.com/knackstedt/downdraft.gitcd downdraftInstall Dependencies
Section titled “Install Dependencies”bun installThis installs all workspace dependencies via Bun workspaces. Apps are separate repos — they consume the published @downdraft/* npm packages via their own bun install, and the installed @downdraft/cli provides their node_modules/.bin/draft shim. To develop an app against unpublished engine changes, use bun link (bun link in packages/<pkg>, then bun link @downdraft/<pkg> in the app).
Verify Installation
Section titled “Verify Installation”Scaffold an app and run it to verify everything works:
draft new my-appcd my-appdraft devThis launches the app on the native runtime via its src/native-entry.ts entrypoint. You should see a native window with the WebGPU-rendered scene and devtools overlay.
Running an Existing App
Section titled “Running an Existing App”cd <app-directory> && draft devNext Steps
Section titled “Next Steps”- Development — Learn the dev workflow and project structure
- ECS Guide — Understand the entity component system
- CLI Reference — Explore the
draftCLI commands