The first AI-agent-native game engine — built with Rust, designed for AI.
Docs · Quick Start · Games · crates.io
English | 中文
AnvilKit is an AI-first game engine — every API type self-describes via the Describe trait, errors include agent-readable hints, and an MCP server lets AI agents interact with the running game natively. Built on bevy_ecs 0.15 + wgpu 0.19.
See POSITIONING.md for the full vision and ROADMAP.md for progress.
# Use the facade crate for everything:
[dependencies]
anvilkit = "0.1"
# Or pick individual crates:
[dependencies]
anvilkit-core = "0.1"
anvilkit-ecs = "0.1"
anvilkit-render = "0.1"use anvilkit::prelude::*;
struct MyGame;
impl GameCallbacks for MyGame {
fn init(&mut self, ctx: &mut GameContext) {
ctx.app.add_systems(AnvilKitSchedule::Update, hello);
}
}
fn main() {
AnvilKitApp::run(
GameConfig::new("My Game").with_size(1280, 720),
MyGame,
);
}
fn hello() {
println!("Hello from AnvilKit!");
} ┌──────────┐
│ anvilkit │ ← facade, re-exports everything
└────┬─────┘
┌──────┬──────┬────┬───┼───┬───────┬────────┬─────┬────┬──────────┐
▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼
┌──────┐┌───┐┌──────┐┌──────┐┌─────┐┌─────┐┌──────┐┌───┐┌──┐┌────────┐┌────┐
│ core ││ecs││render││assets││input││audio││camera││app││ui││gameplay││data│
└──────┘└─┬─┘└──┬───┘└──────┘└─────┘└─────┘└──────┘└─┬─┘└──┘└────────┘└────┘
│ │ │
bevy_ecs wgpu + winit winit + ecs
| Crate | What it does | Key deps |
|---|---|---|
| anvilkit-core | Math (glam), transforms, time, errors, persistence | glam |
| anvilkit-ecs | ECS world, schedules, plugins, physics | bevy_ecs |
| anvilkit-render | GPU pipelines, sprites, particles, text | wgpu, winit |
| anvilkit-assets | glTF loader, asset server, procedural meshes | gltf |
| anvilkit-input | Keyboard/mouse/gamepad state, action mapping | winit |
| anvilkit-audio | Spatial audio, playback, mixing | rodio |
| anvilkit-camera | Camera system: 5 modes, trauma shake, spring arm, rail, transitions | bevy_ecs, glam |
| anvilkit-app | App runner, GameCallbacks, window lifecycle | winit |
| anvilkit-ui | Flexbox layout, events, widgets, themes | taffy |
| anvilkit-gameplay | Stats, health, inventory, cooldowns, effects | bevy_ecs |
| anvilkit-data | Data tables (RON/JSON), i18n locale | ron |
|
Minecraft-style voxel sandbox with terrain generation, block building, water, day/night cycle, greedy meshing, health system with fall damage and drowning, slot-based inventory, data-driven blocks, and player state persistence. cargo run -p craft |
PBR pool simulation with AABB physics, ball-to-ball collision, break shots, rule enforcement, and orbit camera controls. cargo run -p billiards |
The anvil CLI scaffolds new projects from templates:
cargo install anvilkit-cli
anvil new my-game --template first_person
cd my-game && cargo runTemplates: 3d_basic, first_person, topdown
git clone https://github.com/ketd/AnvilKit.git
cd AnvilKit
cargo build --workspace
cargo test --workspaceRun the docs site locally:
cd docs && pnpm install && pnpm devDual-licensed under MIT or Apache 2.0, at your option.
Built on the shoulders of Bevy ECS · wgpu · winit · glam · rodio
Forging games with Rust 🔨