Unity playable runtime with Rust world-generation backend and MCP tool surface
WorldGen MCP Unity
Unity runtime for a procedural world game, backed by Rust computation and exposed to AI tools through MCP.
What This Is
This repo is split into three layers:
- Unity for the playable 3D scene, editor workflows, previews, and player runtime
- Rust for deterministic world generation, validation, mutation tracking, and snapshots
- MCP for AI-facing orchestration and tool access
The first usable version is designed to work in an assetless mode using generated meshes, primitives, colors, lighting, fog, and debug overlays.
Key Documents
Docs/ARCHITECTURE.mdDocs/BOUNDARY_CONTRACT.mdDocs/ENGINEERING_RULES.mdDocs/Specs/world_generation_mcp_spec.mdCONTRIBUTING.mdbackend/README.md
Quick Start
- Clone the repo.
- Install Unity 2021.3 LTS or newer.
- Ensure Rust and Bun are installed.
- Open the Unity project from the repo root.
- Use the Bun commands below for docs and backend checks.
Bun Installation
Bun is only used here as a task runner for repo commands.
If Bun is already installed:
bun --version
If you want Bun on your PATH for this repo session:
export PATH="$HOME/.bun/bin:$PATH"
bun --version
No bun install step is required for this repo, because the package.json is only a local command manifest.
If Bun is not installed, follow the official installation guide and then rerun the command above.
Bun Commands
Run commands from the repo root.
Docs
bun run docs:specbun run docs:rulesbun run docs:architecturebun run docs:contributing
Backend
bun run backend:checkbun run backend:fmtbun run backend:clippybun run backend:testbun run backend:runbun run backend:contractbun run backend:clean
Repo
bun run helpbun run repo:treebun run workspace:status
Recommended Workflow
- Read
Docs/ENGINEERING_RULES.mdbefore implementation. - Update
Docs/BOUNDARY_CONTRACT.mdwhen the Unity/Rust interface changes. - Keep Rust authoritative for world state and generation.
- Keep Unity focused on rendering, input, physics, and presentation.
- Use assetless generation first, then layer in art later if needed.
Repository Layout
Assets/- Unity runtime and editor-side codeDocs/- architecture, contract, and engineering rulesbackend/- Rust workspace and contract docsPackages/- Unity package metadataProjectSettings/- Unity project settings
Status
- scaffolded project
- Rust backend workspace initialized
- Unity boundary DTOs and client wrapper added
- architecture and boundary contract documented
- ready for implementation of runtime sync and chunk streaming