gametau

Write game logic once in Rust. Ship native to Steam. Keep the web build for itch.io. Develop in Chrome with hot-reload.

Get Started Try Battlestation API Docs

How It Works

core/ (Rust)Pure game logic — no framework deps
Tauri (desktop)#[tauri::command] → native IPC
WASM (browser)#[wasm_bindgen] → direct call
invoke("tick_world") Same frontend code. Auto-routes at runtime.

Why gametau?

Dev in Chrome

Full DevTools, hot-reload, shareable dev URLs. Drop into tauri dev only when testing desktop-specific behavior.

No GC Pauses

Rust has no garbage collector. Your simulation ticks at a consistent cost every frame, not whenever JS decides to collect.

2-5x Faster Physics

Physics, pathfinding, and large entity counts run measurably faster in WASM than equivalent JS. On desktop, it's full native code.

Portable Core

The core/ crate has zero framework dependencies. Reuse it for a multiplayer server, a new target, or anywhere else.

Quick Start

$ bunx create-gametau my-game
Templates: -t three (default) · -t pixi · -t vanilla

Live Demos

Battlestation

Flagship tactical radar command loop. Exercises runtime bridge, app metadata, local profile persistence, asset loading, and alert event orchestration in one end-to-end scenario.

Rust + Canvas2D + full webtau module story

Counter

Simplest possible example. Increment, decrement, reset — Rust logic called through the same invoke() API that works on both web and desktop.

Rust + vanilla DOM

Pong

Two-player Pong with real physics. Ball collision, paddle clamping, score tracking — all in Rust, rendered with PixiJS at 60fps.

Rust + PixiJS

Packages

Package Registry Purpose
webtau crates.io wasm_state! macro for WASM state management
webtau npm invoke() router + Tauri API shims
webtau-vite npm Vite plugin: wasm-pack automation + import aliasing
create-gametau npm Project scaffolder CLI