Skip to content

Installation

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.

Terminal window
curl -fsSL https://bun.sh/install | bash

Rust is only needed if you’re building the platform or audio native libraries from source.

Terminal window
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Terminal window
git clone https://github.com/knackstedt/downdraft.git
cd downdraft
Terminal window
bun install

This 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).

Scaffold an app and run it to verify everything works:

Terminal window
draft new my-app
cd my-app
draft dev

This 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.

Terminal window
cd <app-directory> && draft dev