RustWarp is a reimplementation of the TurboWarp editor in Rust, targeting a TurboWarp-compatible, pixel-identical UI.
- Web editor: https://rustwarp.1zworks.com/
- Desktop downloads: GitHub Releases · release notes and install steps
- Source code: https://github.com/rbstxt/rustwarp
The editor UI — menu bar, block workspace, costume editor, sound editor, sprite pane, modals, libraries and the
bundled addons — is drawn and handled in Rust with egui 0.37 + wgpu 30. The same Rust core is compiled to
wasm32-unknown-unknown for the browser and to native desktop binaries.
On the Web, the project runtime and its stage rendering are TurboWarp's own JavaScript packages, unchanged
(scratch-vm, scratch-render, scratch-audio, scratch-storage, scratch-svg-renderer), pinned in
web/package.json. They run in the page next to the wasm app. The native build runs
scratch-vm in an embedded V8 isolate and draws the stage with the Rust rw-stage-render.
browser page (web/)
├─ <canvas> scratch-render stage (below)
├─ <canvas> egui app (above; transparent where the stage is)
└─ scratch-vm (JS) <— window.rustwarpHost —> rw-bridge (Rust)
Every pixel is derived from TurboWarp's source: sizes, colors, radii, fonts and layout are copied from scratch-gui / scratch-blocks / scratch-paint, and parity is measured against a pinned TurboWarp build. See docs/architecture.md for the shared Web/native core and docs/pixel-parity.md for how parity is measured.
The Web editor is deployed to Cloudflare Pages at https://rustwarp.1zworks.com/ after every green CI run on
integration.
The desktop app supports macOS, Linux and Windows. Prebuilt archives are attached to GitHub Releases; the Native Release workflow builds them for macOS arm64, Linux x86_64 and Windows x86_64, and version tags publish the archives with SHA-256 checksums. Capabilities and remaining native work are tracked in docs/native.md; versioning and download details are in docs/release.md, and user-visible changes are listed in CHANGELOG.md.
Factual details live in the docs:
- docs/native.md — desktop app capabilities, remaining native checklist, smoke tests.
- docs/pixel-parity.md — current parity measurements per region and the remaining gaps.
- docs/perf.md — load benchmarks and production verification against turbowarp.org.
- docs/addons.md, docs/bridge.md — addon coverage and the JS ↔ Rust bridge.
| Path | Role |
|---|---|
crates/rw-core |
Shared state (AppState), Command (UI → runtime) and Event (runtime → UI). No UI dependencies. |
crates/rw-bridge |
Runtime trait; WebRuntime talks to window.rustwarpHost; the native runtime implements it in Rust. |
crates/rw-host-core |
Native host orchestration: .sb3 ZIP IO, security policy, monitor layout, restore points. |
crates/rw-theme |
Colors, metrics, fonts and the gui_asset! macro. |
crates/rw-i18n |
Localized strings and block messages, using scratch-gui's message ids. |
crates/rw-gui |
Menu bar, stage header, target pane, asset list, modals and libraries. |
crates/rw-blocks |
Block workspace (scratch-blocks parity), toolbox and flyout. |
crates/rw-paint |
Costume editor (scratch-paint parity). |
crates/rw-sound |
Sound editor. |
crates/rw-addons |
Reimplementation of the addons bundled with TurboWarp. |
crates/rw-stage-render |
Rust/wgpu port of scratch-render; the desktop stage renderer and the opt-in Web renderer. |
crates/rw-native-runtime |
Embedded V8 + scratch-vm runtime for the desktop app. |
crates/rw-native-audio |
Native audio engine (CPAL) implementing scratch-audio semantics. |
crates/rw-native-extensions |
Native implementations of the six built-in software/hardware extensions. |
crates/rw-app |
App shell and layout; native binary and wasm entry start(canvas_id). |
web/ |
JS host page: loads TurboWarp's runtime and the wasm app, plus build script and webpack config. |
tools/pixeldiff/ |
Reference TurboWarp captures and pixel comparison against RustWarp. |
tools/verify/ |
Playwright verification suites (UI batches, parity extras). |
docs/ |
Architecture, native, parity, performance, addons, bridge and ownership notes. |
Agent/contributor conventions (ownership, pixel rules, build gates) are in CLAUDE.md and docs/ownership.md.
The versions below are the ones CI uses (.github/workflows/ci.yml):
-
Rust 1.100.0 (
rustup toolchain install 1.100.0). For Web builds alsorustup target add wasm32-unknown-unknown. -
wasm-bindgen 0.2.130 and binaryen 133 (
wasm-opt) for release Web builds.web/build.shlooks them up aswasm-bindgen/wasm-optonPATH, or takesWASM_BINDGEN/WASM_OPT. -
Node.js 26 with npm for the Web build.
tools/pixeldiffneeds Node.js 22 or newer, and the pinned reference TurboWarp build is compiled with Node.js 20. -
On Linux (native app), the development packages used by the native release workflow:
sudo apt-get install -y libxkbcommon-dev libwayland-dev libx11-dev libxcursor-dev \ libxrandr-dev libxi-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev \ libvulkan-dev libgl1-mesa-dev libgtk-3-dev libasound2-dev libclang-dev pkg-config
macOS needs the Xcode command line tools; Windows needs the MSVC build tools.
Expect the first native build to take a while: it compiles and links the embedded V8 static library
(v8 152.2.0).
cd web
npm ci
npm run build # sh ./build.sh --release && webpack --mode productionThe result is a static site in web/dist/. Serve it over HTTP — the page needs the
Document-Isolation-Policy: isolate-and-credentialless header from web/_headers for
SharedArrayBuffer/threads. For development, npm run dev builds the wasm in debug mode and starts webpack's dev
server on http://127.0.0.1:5173/ with the same headers. sh ./build.sh --release|--debug|--watch builds only the
wasm package.
CI rejects a .wasm above 25 MiB (26214400 bytes), the Cloudflare Pages static asset limit.
cargo build --release --locked -p rw-app # binary: target/release/rustwarp
cargo run --locked -p rw-app -- /path/to/project.sb3Or download a prebuilt archive from GitHub Releases. Desktop
behavior, smoke modes and the embedded-VM rebuild steps are described in docs/native.md. The
release workflow packages RustWarp.app on macOS, a tarball on Linux and a zip on Windows.
cargo test --workspace --locked
cargo build --workspace --locked
cargo clippy --workspace --all-targets --lockedNative-specific runtime and stage tests, and the headless smoke project:
CARGO_BUILD_JOBS=1 cargo test --locked -p rw-native-runtime
CARGO_BUILD_JOBS=1 cargo test --locked -p rw-app
CARGO_BUILD_JOBS=1 cargo run --locked -p rw-app -- --smoke-sb3 --builtinWeb host smoke test (needs Playwright Chromium from tools/pixeldiff, and a served web/dist/):
(cd tools/pixeldiff && npm ci && npx playwright install chromium)
RUSTWARP_URL=http://127.0.0.1:5173/ node web/tests/host-smoke.mjsRUSTWARP_URL defaults to http://127.0.0.1:5173/. On machines without a GPU, pass the SwiftShader flags from
CI through SMOKE_GPU_ARGS.
The full matrix runs in CI. Prefer the workflows and uploaded reports over reproducing them locally:
.github/workflows/ci.yml— native job (test, build, clippy on macOS) and Web job (wasm32 release build, webpack, wasm size limit, routing, host smoke, project page). Runs onmain,integrationand every pull request into them..github/workflows/verify.yml— Playwright verification batches, deep batch extras and multi-zoom pixel diff against a pinned TurboWarp build. Runs on pushes tointegration; reports are uploaded as workflow artifacts..github/workflows/native-stage-parity.yml— native stage output and parity checks against the same pinned TurboWarp build..github/workflows/e2e-prod.ymland.github/workflows/perf-prod.yml— real-browser production flows and startup benchmarks against https://rustwarp.1zworks.com/, after a deploy and daily..github/workflows/deploy-pages.yml— deploysweb/distto Cloudflare Pages after a green CI run onintegration.
For targeted local runs, tools/verify documents the harness:
node tools/verify/verify_batches.mjs --suite=alltools/pixeldiff captures the reference TurboWarp editor and RustWarp, then diffs them; method,
scenarios and commands are in docs/pixel-parity.md.
Branch from the latest origin/integration, keep the change scoped to the paths your task owns
(docs/ownership.md), and open a pull request into integration. CI on the pull request is the
gate. Pixel values must cite their TurboWarp source; see the pixel parity rules in CLAUDE.md.
RustWarp is licensed under GPL-3.0-only (LICENSE).
It reuses and ports GPL-3.0 code and assets from TurboWarp, the Scratch Foundation and Scratch Addons, and keeps their upstream copyright notices:
- TurboWarp scratch-gui (TurboWarp's fork of the Scratch Foundation's scratch-gui), GPL-3.0
- scratch-blocks, Scratch Foundation, GPL-3.0 (including Blockly-derived files under Apache-2.0)
- scratch-paint, Scratch Foundation, GPL-3.0
- Scratch Addons, GPL-3.0
TurboWarp's runtime packages (scratch-vm, scratch-render, scratch-audio, scratch-storage,
scratch-svg-renderer) are used as dependencies under their own licenses.
RustWarp is an unofficial, independent project. It is not affiliated with, endorsed by, or supported by TurboWarp, Scratch, the Scratch Foundation, or the MIT Scratch Team. "Scratch" is a trademark of the Massachusetts Institute of Technology; RustWarp uses the name only to describe compatibility with Scratch projects.
Please report RustWarp bugs and issues in this repository's issue tracker, not to TurboWarp or the Scratch Team.