Skip to content

Get started

Start with a small example you can run, then read about the calls it uses.
Using a coding agent? Start here

Canwu ships two skills for coding agents. Ask your agent to load them before it writes code:canwu-engine-docs and canwu-engine-usage. Then start with the Get started and the relevant runnable example, and use the guides as needed.

Starter prompt

Load the canwu-engine-docs and canwu-engine-usage skills. Read the Canwu tutorial, guide page, and example that match this task. Use only canwu-api, state the rule you must preserve before you edit, and run the example or a focused check when you are done.

Start with Move an army. It takes a few minutes, runs on any machine with Rust 1.88 or newer, and shows the whole cycle: submit a command, advance time, then save, fork, and replay the run. Come back to the other tutorials when you need the feature they cover.

Section Use it when Start with
Get started You are new to Canwu and want to run something first Move an army
Tutorials You want to learn the engine’s core features one at a time Continuous-time game loop
Guides You are adding Canwu to your own application and have a specific task Integrate and drive the simulation
Engine architecture You want to know how commands are settled, recorded, and replayed Architecture overview
Domain systems You need rules for knowledge, resources, movement, war, technology, taxes, or society Domain systems
Case studies You want to see several systems work together in one scenario Case studies
Reference You need the standard English or Chinese term for a concept Canwu terminology

These tutorials use only canwu-api; Move an army also uses the reference world. Your application still chooses its renderer, window, input, and game framework.

Domain systems supply concrete rules for knowledge, resources, war, taxes, and more; most are optional crates you register as needed. Three of them also have a walkthrough, and their design pages are Routing, transport, and movement, Military, and Technology.

Case studies combine several systems into one runnable historical scenario.