Skip to content

ketd/AnvilKit

Repository files navigation

AnvilKit



The first AI-agent-native game engine — built with Rust, designed for AI.

crates.io docs.rs license CI

Docs · Quick Start · Games · crates.io

English | 中文


What is AnvilKit?

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!");
}

Crate Map

                          ┌──────────┐
                          │ 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

Games

Craft

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

Billiards

PBR pool simulation with AABB physics, ball-to-ball collision, break shots, rule enforcement, and orbit camera controls.

cargo run -p billiards

CLI

The anvil CLI scaffolds new projects from templates:

cargo install anvilkit-cli
anvil new my-game --template first_person
cd my-game && cargo run

Templates: 3d_basic, first_person, topdown

Building from Source

git clone https://github.com/ketd/AnvilKit.git
cd AnvilKit
cargo build --workspace
cargo test --workspace

Run the docs site locally:

cd docs && pnpm install && pnpm dev

License

Dual-licensed under MIT or Apache 2.0, at your option.

Acknowledgments

Built on the shoulders of Bevy ECS · wgpu · winit · glam · rodio


Forging games with Rust 🔨

About

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors