Skip to content
@wasmcart

wasmcart

Portable, sandboxed game cartridges powered by WebAssembly. One .wasc file runs in a browser, a terminal, RetroArch, or an ARM handheld.

wasmcart

Portable, sandboxed game cartridges powered by WebAssembly.

A cart is a single .wasc file: a standalone WebAssembly module that owns its own memory and talks to the outside world through one small contract. The host writes input and timing, calls wc_render() each frame, and reads back pixels and audio. No filesystem, no syscalls, no ambient authority.

Because a cart is only WebAssembly plus a fixed ABI, the same file runs anywhere a conforming host exists: a browser, a desktop, an Android phone, RetroArch, an ARM handheld, even a terminal. Write the game once; it runs on all of them, sandboxed, with no install and no dependencies.

🕹️ Play in your browser · 📄 wasmcart.org · 📘 The spec · 🎮 Write a game


Write a game in your language

Repo What you write
Lua wasmcart-lua Real Lua 5.4 behind a LÖVE-style API: love.load, love.update(dt), love.draw
Python wasmcart-pygame CPython 3.13 + pygame-ce. Existing pygame games port largely as-is
Ruby wasmcart-mruby mruby with a DragonRuby-style API: def tick args
JavaScript wasmcart-jsgame Canvas 2D, WebGL2, WebGPU and Web Audio on QuickJS + Skia. Browser games, unmodified; three.js WebGPURenderer included
TypeScript wasmcart-scriptc TypeScript compiled ahead of time to wasm: no interpreter, no JIT
GDScript wasmcart-godot Godot 4, compiled to standalone WebAssembly
Defold wasmcart-defold Defold projects, on a standalone WebAssembly build of the Defold runtime
Rust wasmcart-rust no_std bindings and a wc_cart! macro. No runtime, no allocator, no unsafe in your game code
Rust + Bevy wasmcart-bevy Bevy 0.20 (ECS, 2D, 3D PBR, gamepads, audio) on the host's WebGPU, no wasm-bindgen
Rust + macroquad wasmcart-macroquad macroquad on a miniquad backend for the cart ABI: GL, gamepads, audio, no JavaScript
Zig wasmcart-zig Freestanding bindings and a comptime Cart(.{...}) helper. A complete cart in 432 bytes
C / C++ wasmcart-sdl2 An SDL2 backend retargeted at the cart ABI, plus the full porting guide

For the scripting rows the engine is already compiled and ships as WASM: a full language runtime that happens to satisfy the ABI. Your game is source, packed into the cart as an asset. No compiler in your loop, no WASM target to install, nothing to cross-compile.

Rust, Zig and C compile instead, and pay nothing for it: the ABI is three exported functions and a struct, so a cart carries no interpreter and no GC. These are the smallest carts anyone can produce: a complete Zig cart that fills the screen is 432 bytes with zero imports.

Libraries for compiled carts: wasmcart-libs (reproducible static libraries for wasm32-wasip1-threads + SIMD) and wasmcart-skia (Skia 2D graphics as static archives).

Run it anywhere

One .wasc, every host: that is the whole point of the format.

Repo Host
wasmcart The spec, plus the JavaScript reference hosts (CartHost, CartHostWeb) and the wasmcart CLI
play.wasmcart.org Play carts in the browser, on WebGL2 or WebGPU
wasmcart-native A standalone desktop player for Linux, macOS and Windows. One binary
wasmcart-libretro A libretro core: carts run in RetroArch and RetroDECK alongside emulated consoles
wasmcart-android-player An Android app that plays a folder of carts or free games from the catalog, offline
wasmcart-android Turn one cart into a store-ready Android app: touch, gamepads, no WebView
wasmcart-android-lua Lua carts as small native Android APKs, bit-exact with the wasm engine
build-libnode Prebuilt libnode (V8), the substrate the native, libretro and Android hosts build on

Carts render with OpenGL ES 3.0 (WebGL2), and can use the optional WebGPU tier for compute shaders and modern renderers. A cart that imports both runs everywhere.

Games and examples

Repo What it is
opentyrian OpenTyrian, the open-source port of the classic DOS shooter, as a cart
chromium-bsu Chromium B.S.U., the open-source arcade space shooter, as a GL cart
blocks4-wat A falling-block puzzle written by hand in WebAssembly text, under 5KB
columns-wat A falling-triplet jewel game written by hand in WebAssembly text, under 5KB
wasmcart-godot-examples Godot games running as carts
wasmcart-defold-examples Defold games running as carts
wasmcart-rust-examples Rust games as carts, on macroquad and wgpu

Built with cartwheel

cartwheel-engine is a 2D and 3D game engine in C that builds native games and dual GL + WebGPU carts. Its demo games are full games, most for one to four players on a pad, and each ships as a cart you can play at play.wasmcart.org:

Repo Games
cartwheel-examples BikeMesa (downhill bikes), BomberDude (3D arena bomber), Chromite (vertical shooter), derby (demolition derby), pugball (jet-pack pug soccer), racer (rollercoaster kart racer), spout (a paper spider climbs a rain spout)
more-cartwheel-examples arenafps (split-screen arena shooter), Street Toughs (street brawler), coopplatformer, crawler (co-op dungeon crawler), fighter (2D rules, 3D look), hordeshooter, jetski (wave racing), partypack (party games), Pirates (naval), Sky Fighter (jet combat), Tux Racer
even-more-cartwheel-examples towers (tower defense), pinball, skate (split-screen skateboarding), Lanternfall (2D exploration), Destructo and Detexto (physics destruction), Ember Throne (third-person action adventure), jewels (match-three), beatsync (house-music rhythm)
cartwheel-boardgames Board games for one to four players on one screen, with computer opponents (in progress)

Try one

npx wasmcart game.wasc          # SDL window, audio, gamepad
npx wasmcart game.wasc --term   # or play it in your terminal

Why a cartridge?

For players: a .wasc is one self-contained artifact. No launcher, no store, no account, no updates. And it is a real sandbox: no filesystem, no arbitrary network, no syscalls, so you can run an untrusted cart the way you'd run a ROM.

For developers: no artificial limits. Full OpenGL ES 3.0 or WebGPU, float audio, and no cap on resolution, colors or code size. One build targets the web, desktop, Android, handhelds and RetroArch at once, because the host adapts and the cart doesn't care.


MIT licensed, every layer: spec, hosts, and language runtimes. Start at wasmcart.org, play at play.wasmcart.org, or read the spec.

Popular repositories Loading

  1. wasmcart wasmcart Public

    A virtual game cartridge format: one sandboxed .wasc file runs on browser, desktop, Android, RetroArch and handhelds. Spec + JS reference hosts.

    JavaScript 6 2

  2. wasmcart-libretro wasmcart-libretro Public

    libretro core for RetroArch that runs wasmcart .wasc game carts, with gamepad, audio, save states, shaders and netplay. V8 via libnode.

    C 1

  3. wasmcart-godot wasmcart-godot Public

    Write games in GDScript. Ship them as wasmcart carts. Godot 4 compiled to standalone WebAssembly.

    C++ 1

  4. wasmcart-rust wasmcart-rust Public

    Write games in Rust. Ship them as wasmcart carts. no_std bindings for the cart ABI: tiny, zero-dependency, no runtime.

    Rust 1

  5. wasmcart-defold wasmcart-defold Public

    Write games in Defold. Ship them as wasmcart carts. Defold compiled to a standalone WebAssembly cart runtime.

    C++ 1

  6. build-libnode build-libnode Public

    Prebuilt libnode (V8 + libuv + the Node.js embedding API) static libraries per Node version and platform, so projects link in seconds instead of building V8.

    JavaScript

Repositories

Showing 10 of 29 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…