Forge is not a game engine. It is the DevOps engineer for your game engine.
Rust is the future of high-performance game development, but the tooling gap between "Hello World" and "Shipped RPG" is massive. Linker configuration, asset compression pipelines, WebGPU bindings, and mobile scaffolding are painful to manage manually.
Forge automates the entire production lifecycle, wrapping cargo to provide the specific build strategies needed for AA/AAA development.
Forge is the "Performance Tuner" and "Build Orchestrator" specifically for the Rust ecosystem (Game Dev & WASM). It solves the "Physics of Rust" (slow compile times) by automating complex optimizations.
1. The Tech Stack
- Language: Written strictly in Rust.
- Distribution: Installed via
cargo install forge(or pre-built binary).
2. Core Responsibilities (The "Must-Haves")
- Linker Orchestration: It must automatically detect the OS and download/use
mold(Linux) orlld(macOS) to speed up linking by 10x without user config. - Compilation Strategy:
- Dev Mode: Auto-configure Dynamic Linking (bevy_dynamic_plugin) for fast incremental compiles.
- Prod Mode: Auto-configure LTO (Link Time Optimization) and Static Linking for max performance.
- WASM Bridge: It must wrap
wasm-packorwasm-bindgento make compiling Rust logic for the web one click. - Asset Hot-Reloading: It needs a watcher that updates textures/models in the running game process without triggering a full code recompile.
3. The User Experience
- Command:
forge run - Command:
forge wasm(Builds.wasmfile and generates TS bindings). - Command:
forge mobile(Wraps NDK/iOS setup for Bevy games).
Summary: Forge is not a game engine. It is the DevOps for the Game Engine.
The Verdict: It depends entirely on what you define as "Game Graphics."
Here is the breakdown by category:
- Suitability: 0/10 (Impossible)
- Why:
- GoTH (Go+Templ): This produces HTML text. It has zero access to the GPU. You cannot render 3D graphics with HTMX.
- Flutter: Uses the Impeller/Skia engine. While it supports basic 3D, it is optimized for UI layers (flat surfaces, text, shadows), not volumetric lighting or complex physics.
- Rig: It runs processes; it doesn't draw pixels.
- Conclusion: You cannot build Cyberpunk 2077 or even Valheim with this stack.
- Suitability: 8/10 (Great)
- Why:
- Flutter has a game engine called Flame. It is excellent for "Candy Crush" or "Flappy Bird" style games.
- Flutter's animation system is 60fps native.
- GoTH: Can serve the high-scores, multiplayer lobbies, and user profiles.
- Conclusion: Excellent for mobile-first casual games.
- Suitability: 10/10 (Perfection)
- Why:
- Game Editors (like Unity's Inspector) are essentially complex forms (inputs, sliders, trees).
- Flutter is arguably the best technology in the world right now for building complex, data-heavy UIs.
- GoTH: Perfect for the "Meta-Game" (Inventory management on the web, Guilds, Marketplaces).
- Conclusion: This is the killer use case. Use this stack to build the Tools that manage the game.
Here is the definitive README.md for Forge. It is written with the tone of a mature, industry-standard tool releasing in 2027.
Forge optimizes for one thing: Time to First Frame.
- Smart Linking: Automatically detects your OS and downloads/links
mold(Linux) or native platform linkers without you touching a config file. - Dynamic Injection: Automatically injects
bevy/dynamic_linking(or equivalent) and forces Cranelift codegen for sub-second incremental compiles. - Hot Reloading: Runs a dedicated watcher for assets, shaders, and texture hot-swapping.
Cargo ignores your assets. Forge manages them.
- Auto-Compression: Drop a 4MB
.pnginto/assets. Forge converts it to.kktx2(GPU compressed) in the background. - Audio Tuning: Automatically converts
.wavto.oggor.flacbased on platform targets. - Hermetic Builds: All toolchain binaries (encoders, linkers, SDKs) are version-locked in
forge.lock.
- WebGPU Native: One command (
forge build --web) builds optimized WASM, generates the JS bridge, and outputs a deploy-ready folder. - Mobile Ejection: We don't hide the build system.
forge mobile initgenerates a fully configured Android Studio and Xcode project linked to your Rust lib. You get full control of the native layer.
- One-Click Speed: Run
forge build --pgo. Forge compiles an instrumented binary, runs your game in headless mode to gather profile data, and re-compiles the final artifact with 15-20% runtime performance gains.
# Install from Crates.io
cargo install forge
# Initialize in an existing Rust project
forge initForge is designed to complement cargo for game-specific tasks.
# Replaces `cargo run`.
# Enables dynamic linking, mold, and asset watching.
forge run# Builds for release.
# Enables LTO, PGO, strips symbols, and compresses assets.
forge build --release
# Build for Web (WebGPU/WASM)
forge build --target web# Scaffolds native projects in /platforms/android and /platforms/ios
forge mobile init
# Compiles the Rust lib and triggers the native build systems
forge mobile buildForge adheres to the "Single Source of Truth" philosophy. You do not need a new config file. Forge reads from [package.metadata.forge] in your existing Cargo.toml.
Define your intent here.
[package.metadata.forge]
# Game Identity
app_id = "com.studio.spiritecho"
display_name = "Spirit Echo"
[package.metadata.forge.assets]
# Asset Pipeline Rules
dir = "assets"
texture_format = "kktx2" # Auto-compress textures
audio_format = "ogg"
[package.metadata.forge.build]
# Dev Experience
backend = "cranelift" # Use Cranelift for debug builds
feature_flags = ["bevy/dynamic_linking"] Forge automatically generates this file. Commit this to Git.
It locks the environment to ensure every developer on your team uses the exact same version of external tools (Linkers, NDKs, Texture Encoders).
# DO NOT EDIT MANUALLY
[[tools.linker]]
name = "mold"
version = "2.33.0"
checksum = "sha256:..."
[[tools.android]]
ndk_version = "29.0.789"Forge sits between you and Cargo.
- Input: You run
forge run. - Resolution: Forge reads
Cargo.toml(for settings) andforge.lock(for toolchain versions). - Provisioning: If
moldor thewasm-bindgenCLI are missing or version-mismatched, Forge downloads them to~/.forge/cache. - Execution: Forge constructs the optimal
RUSTFLAGSand invokescargo. - Post-Process: Forge processes assets and moves binaries to the output directory.
Forge is the standard-bearer for the Rust Game Dev ecosystem.
- Design Philosophy: "Convention over Configuration." We assume you want the industry standard (WebGPU, Compressed Textures, Fast Compiles).
Built for the next generation of Rust Games. Conceptualised in 2025. Starts in 2027.