Sim;Logic
Sim;Logic helps you build interactive Rust applications without wiring up an ECS, window loop, input handling and renderer integration every time. You write ordinary Rust components and functions. Sim;Logic runs them; Sim;Engine draws the result.
It is useful for simulations, tools and games. It is not a visual editor, a physics engine or a second renderer.
What is included
- One active World, typed components and resources, sequential Systems, and deferred structural Commands.
- Fixed-step simulation, interpolation, pause, time scaling and World replacement.
- Keyboard and pointer input, scroll, cursor capture and headless input injection.
- World-space 2D visuals; screen geometry, images, text, clipping and UI helpers.
- A retained 3D bridge for host-built meshes, materials, lighting and textures.
- Optional audio output, explicit resource limits and presentation diagnostics.
The current dependency is Sim;Engine 0.4.2, pinned exactly. The 0.1 API is pre-1.0; future minor releases may change it.
Install
Rust 1.95 or newer is required. Add Sim;Logic to your Cargo.toml:
[]
= "0.1.0"
The default desktop feature includes the window and GPU adapter. For a
windowless application or test:
= { = "0.1.0", = false }
| Optional feature | Adds |
|---|---|
fonts |
Engine's CPU font loading, shaping and rasterization. |
headless-text |
Managed fonts and text preparation, without a GPU. Includes fonts. |
text |
GPU text rendering. Includes headless-text, but not the desktop window host. |
audio |
Single-source audio device output through Rodio. |
easter-eggs |
The bundled Ferris draw_crab helper. |
Keep default features for the stock desktop host; add features = ["text"]
for labels. Font files belong to the application. On Linux, audio requires
ALSA development files and pkg-config at build time.
A moving ball
use *;
const MOVEMENT: = new;
WASD and arrows move the ball; closing the window exits. No key has hidden pause or quit behavior. The getting-started guide tests the same movement without opening a window.
Run the examples
From this checkout:
The larger examples keep their game rules outside the library:
- Twin Fields: two voxel worlds, building, inventory and creative flight.
- Frontier: territory conquest, bots, camera navigation and a mechanics inspector.
- Piano roll: editing, synthesis and a switchable 2D/3D piano.
- Iron Maze: a small 2.5D shooter.
Learn more
Start with the documentation index or generate the
API reference with cargo doc --all-features --no-deps --open.
Release checks describe how to validate
the package. User-visible changes are in the changelog.
There is one window and one active World. Systems run sequentially. World factories are synchronous, without runtime payloads. There is no general widget/layout toolkit, model importer or automatic collision solver. Runtime boundaries and the rendering guides describe failure handling and supported paths. Desktop verification currently covers Linux/Vulkan; Windows has not been qualified by Sim;Logic.
License
Dual-licensed under MIT or Apache-2.0, at your option. Bundled third-party assets retain their own font and Ferris notices.