Built on
Balaur reuses the Rust ecosystem rather than re-implementing it. These are the major libraries underneath, and what each one does for the engine.
| Library | What it does in Balaur |
|---|---|
| hecs | The ECS every node is an entity in |
| Rapier | 2D and 3D physics, built with enhanced-determinism |
| wgpu via kiss3d | Rendering, windowed and offscreen; winit for the window |
| egui | The immediate-mode UI scripts draw, and the editor itself |
| rodio | Audio playback |
| gilrs | Gamepads |
| Rune | The scripting language and VM, lightly forked so powf/powi are deterministic |
| glamx | Math: glam re-exported whole, plus pose and rotation types. Shared with Rapier and kiss3d so nothing converts |
| libm | Bit-identical transcendentals on every platform, under both glam and the engine's own math |
| gltf, image | Model and texture loading |
| ureq, tungstenite, rustls | HTTP, websockets, TLS |
| serde, toml | Scenes, assets, project files, packs |
| notify | The file watcher behind hot reload |
| tracing | Logging, into the editor's Output dock |
| clap | The balaur command line |
| libloading | Run-time extensions from shared libraries |
Every crate in the workspace, with its dependencies, is listed in the generated Crates reference.
glamx, glam and libm
These three look like three choices and are really one. glamx is dimforge's
extension crate over glam — it adds Pose2/Pose3/Rot2 and re-exports
everything else, so depending on it is depending on glam. Balaur names only
glamx; use glamx::Vec3 is the single spelling across the workspace.
libm is underneath both. Rapier's enhanced-determinism builds glam against
libm instead of the platform's math library, and the workspace pins those
features itself so they hold in every build rather than only when physics
happens to be in the dependency graph. The engine calls libm directly for the
transcendentals that do not come out of a glam type — skeleton rest poses,
slerp, IK, easing curves, and the math module scripts call. Same library,
reached two ways. See Determinism.