create-gametau
v0.7.0
Published
Scaffold a Tauri game that deploys to web + desktop
Downloads
204
Readme
create-gametau
Scaffold a Rust game project for the stable Web (WASM) + Tauri desktop path from one codebase, with optional Electrobun shell support.
Use --desktop-shell electrobun to add Electrobun BrowserWindow/GPUWindow shell files and scripts to the generated project.
Electrobun is available as an explicit shell option — see active milestones.
Repository note:
docs/is intentionally local-only and not published in remote history.
Quick Start
bunx create-gametau my-game
bunx create-gametau my-game --desktop-shell electrobun
cd my-game
bun install
bun run devFor project status and rollout context, see active milestones.
Templates
three(default) - Three.js rendering starterpixi- PixiJS rendering startervanilla- Canvas 2D starter
bunx create-gametau my-game --template pixi
bunx create-gametau my-game --template vanillaCLI Options
--template,-t- Choose scaffold template (three,pixi,vanilla)--desktop-shell- Choose desktop shell (tauri,electrobun)--electrobun-mode- Electrobun shell mode (hybrid,native,dual)--help,-h- Show help output--version,-v- Print CLI version
What gets scaffolded
src-tauri/core- pure Rust game logicsrc-tauri/commands- shared command definitions for desktop + websrc-tauri/app- Tauri desktop shell (stable default desktop runtime)src-tauri/wasm- WASM entry cratesrc- frontend app wired towebtauandwebtau-vitesrc/services- production-ready service seams for backend invoke calls, persistence/settings, mission session snapshots, and event-driven comms
Service Layer Contract
The scaffolded base template now ships a small service architecture instead of a single command wrapper:
src/services/backend.ts- typedinvoke()wrappers for gameplay commands plus long-running task lifecycle seams (startWorldProcessing,pollWorldTask,cancelWorldTask)src/services/settings.ts- runtime settings persistence viawebtau/path+webtau/fssrc/services/session.ts- mission/session snapshot persistence viawebtau/path+webtau/fssrc/services/comms.ts- typed alert/comms channel overwebtau/eventsrc/services/contracts.ts- interfaces/types for settings, session snapshots, and alerts
Runtime bootstrap is explicit in scaffolded src/index.ts:
- Electrobun path:
bootstrapElectrobunFromWindowBridge()fromwebtau/adapters/electrobun - Tauri path:
bootstrapTauri()fromwebtau/adapters/tauri - Web path:
configure({ loadWasm })fromwebtau - Runtime/capability seam:
getRuntimeInfo()fromwebtau
This keeps the generated project lightweight while giving contributors clear extension points for production features.
For full docs and package details, see the main repository: https://github.com/devallibus/gametau
