RustingEngine
A GPU-first game engine for physics-heavy scenes. Vulkan rendering, a Blender-style editor, and hybrid physics — you decide what the CPU owns and what the GPU simulates.
use rusting_engine::prelude::*;
fn update(scene: &mut GameScene<'_>, time: &FrameTime) {
scene.object("Planet").rotate_y(0.2 * time.delta_seconds());
}
rusting_game!(update);Read the docs
50,000 colliding GPU cubes at 119 FPS on an RTX 3060.
StartGetting startedThis page takes you from a fresh checkout to a running game. It takes about 15 minutes, most of it the first compile.
StartComing from GodotThis page maps Godot's ideas to RustingEngine's, so you can carry over what you know. The short version: a Godot scene tree becomes a scene file of named objects with components, GDScript becomes Rust, and the editor and the rusting command line edit the same files.
StartCore conceptsA short tour of the ideas the tutorials rely on.
GuidesEditor guideThe editor window is split into areas, as in Blender. Each area shows one editor type, such as Scene View, Hierarchy, or Inspector, and you can split, resize, and change areas freely. Every change to the scene can be undone.
GuidesLive collaborationSeveral people can edit one project at the same time. The project's owner hosts a session from the editor, and the others join it. Everyone sees the others' scene edits within a fraction of a second, and file changes within about a second.
GuidesAssets: import and exportA project keeps its files under assets/: images, glTF models, sounds and data assets. Import copies a file into assets/, checks that the engine can load it, and records where it came from. Export builds a release and packages the game with its assets into one folder that runs without the engine checkout.
GuidesPlatformsRustingEngine 1.0 ships games for Windows and Linux desktops. macOS through MoltenVK and Android are planned next (roadmap Milestone 21). Web, iOS and game consoles are not supported before 1.0. This page records why, and what would have to change first.
Guides2D gamesA 2D game uses the same renderer, physics and ECS as a 3D one, laid out flat:
GuidesInputGame code reads actions, such as jump or throw, not keys. A scene or the game binds each action to keys, mouse buttons and gamepad buttons. Any bound input triggers the action. Scenario tests press actions by name, so a game that reads actions can be tested without a keyboard.
GuidesPhysics guideThis guide answers four questions for every moving object in a game:
GuidesDeterministic simulationThis page records the rules behind DeterminismMode (Milestone 8). Off promises nothing. Local promises identical results on one machine and build. CrossPlatform promises identical results on every supported device. The rules in this page are what CrossPlatform enforces.
GuidesNetworkingFor a LAN game or a host with an open port:
GuidesAnimationA track writes one property of one object. target is empty for the animated object itself, or a path of child names such as Arm/Hand.
GuidesEffectsParticles make a scene feel alive: dust in a sunbeam, sparks from a hit, smoke over a chimney, snow drifting past the camera. This guide covers rusting.particle_emitter, the full particle component.
GuidesProcedural contentA RandomStream draws a sequence of values from one seed. Take the seed from the run's RandomSeed, so rusting run --seed N, scenario seeds and "seed": N in project.json (the default for both) change the level too:
GuidesLightingWhich lights the renderer has, how many it draws, and which ones cast shadows. rusting schema point_light (and spot_light, directional_light) gives each field with its units and typical values.
GuidesLook and feelA game that passes its tests can still look cheap. Most of the cheap look comes from a few causes: flat lighting, random colors, plain boxes for everything, and a HUD laid on top of the scene. This guide is a checklist for each of them and the polish loop that finds them.
GuidesCamerasA scene can hold any number of rusting.camera entities. Only active cameras render; an inactive camera costs nothing.
GuidesAudioSounds play through kira. Clip paths are relative to the project's assets/ folder ("sfx/hit.wav"). WAV, Ogg, MP3 and FLAC load.
GuidesMenus and UIThe runtime UI is egui 0.31, drawn over the game view. Game code gets the context with scene.ui() every frame and uses the egui version the engine re-exports as rusting_engine::egui, so the game needs no egui dependency of its own.
GuidesModdingPlayers can change a shipped game by putting mods in a mods/ folder next to the game. A mod can replace any file the game reads from assets/ or scenes/, such as a texture, a sound, a model or a level, and can add new ones. Mods cannot run code yet; scripted mods come with WASM scripting.
GuidesGPU condition shaders and custom solversGPU bodies (physics_body.simulation = "Gpu") run in a compute shader. Two hooks let a game add its own GLSL to that shader:
GuidesSurface shadersA material can carry its own GLSL that changes the surface per pixel before the engine lights it: scrolling lava, a pulsing shield, a gradient sky dome, a hologram flicker. Lighting, shadows, fog, decals, reflections and the alpha modes keep working, because the shader only edits the surface the engine then shades.
GuidesShader packsA shader pack is a folder of GLSL hook files and a pack.json manifest that restyles a whole game at once: every surface, the shadows, the sky, clouds, fog, particles, the final image, and full-screen composite passes over the HDR image. Players pick a pack and a Low/Medium/High/Ultra preset in a settings menu; the game reads the same list through GameScene.
GuidesWebAssembly scriptsNative Rust plugins are the main way to write gameplay. The optional rusting-script crate adds small sandboxed scripts for modding and designer-level logic. A script is a WebAssembly module attached to one object. It runs in the Wasmi interpreter with no access to files, the network, the clock, or random numbers. It can read and write the same reflected component fields that scene files, the Inspector, and animation tracks use.
GuidesWriting a pluginA plugin is a bundle of systems, components, resources and input actions that a game adds in one call. Tutorial 3 writes one inside a game. This page is about plugins meant for more than one game: a health system, a dialogue box, a camera rig you reuse.
GuidesPitfallsMistakes that games built with this engine have actually made, each with the diagnostic code that catches it (or "none" when only this page does) and the fix. Run rusting check, rusting lint and rusting test first: most of these show up there. rusting docs show code/<CODE> explains any code.
ReferenceRustingEngine ArchitectureThis document records boundaries that must remain stable as the roadmap is implemented. New features should fit these boundaries instead of reaching across layers. If a boundary must change, update this document and add a migration plan before changing public APIs.
ReferenceVerifiable development environmentMesa's lavapipe is the supported software Vulkan implementation for running GPU-touching code and tests on a machine with no display and no discrete GPU.
ReferenceRustingEngine RoadmapRustingEngine is currently a functional Vulkan renderer prototype with a native Rust ECS runtime, an egui editor, and a GPU-accelerated hybrid physics bridge. The goal of this roadmap is to turn it into a complete, general-purpose Windows/Linux game engine in the same class as Godot — covering 3D and 2D rendering, animation, audio, UI, navigation, networking, a full editor, and export — whose defining strength is physics. RustingEngine should be the engine people pick because of its physics, and the best engine to build games with an LLM coding agent.
ReferenceChangelogThe look release, driven by a voxel game: shader packs restyle a whole game with a folder of GLSL files, shadows soften with distance and fall through leaves, light shines through thin surfaces, and opaque scenes draw faster. 2.5.7, 2.6.0 and 2.6.1 got no GitHub Release of their own; their notes are in CHANGELOG.md. Needs rusting-core 0.4.0, which adds the RenderSettings::shadow_distance and shadow_cascades fields.
Learn by building
- 01
Tutorial 1: Hello cube
You will make the default cube spin and bob up and down, then check the motion with an automated test. You need a project made as in Getting started; this page calls it Hello Cube.
- 02
Tutorial 2: Coin Run from the command line
You will create a complete 2D platformer, play it, change it without opening the editor, catch the change breaking the level with an automated test, take a screenshot, and export a finished build. Every step uses the rusting CLI, so the same loop works in scripts, CI, and for coding agents.
- 03
Tutorial 3: Gameplay plugins
The rusting_game! API from Tutorial 1 is one function per frame. Real games want ECS systems: code that queries components, reads input, and runs at a chosen stage. This tutorial adds two systems to the Coin Run game from Tutorial 2:
- 04
Tutorial 4: GPU cube rain
You will drop 2,000 cubes simulated on the GPU, get an event back from the GPU when each one falls past a line, and show a counter on screen. This is the pattern for debris, swarms, and crowds: the GPU owns the bodies, and the CPU hears only about the moments it cares about.