7 releases
Uses new Rust 2024
| 0.2.4 | Feb 28, 2026 |
|---|---|
| 0.2.3 | Feb 11, 2026 |
| 0.1.0 | Jan 21, 2026 |
| 0.0.1 | Dec 5, 2025 |
#915 in Game dev
740KB
15K
SLoC
Astrelis - A modular game engine
Astrelis is a Rust game engine built around a flexible plugin system. It provides core functionality for game development including:
- Plugin System: Extensible architecture for adding features
- Asset Management: Type-safe asset loading and caching
- Rendering: GPU-accelerated rendering with wgpu
- Text Rendering: High-quality text with cosmic-text
- Input Handling: Keyboard, mouse, and gamepad input
- Windowing: Cross-platform window management
Quick Start
use astrelis::prelude::*;
struct MyGame {
engine: Engine,
}
impl App for MyGame {
fn render(&mut self, ctx: &mut AppCtx, window_id: WindowId, events: &mut EventBatch) {
// Game logic here
}
}
fn main() {
run_app(|ctx| {
let window = ctx.create_window(WindowDescriptor::default()).unwrap();
let engine = Engine::new()
.add_plugin(AssetPlugin)
.add_plugin(RenderPlugin)
.build();
Box::new(MyGame { engine })
});
}
Architecture
The engine is built around the Plugin trait, which allows adding
functionality in a modular way. Plugins can:
- Register resources with the engine
- Hook into the update and render lifecycle
- Depend on other plugins
Default Plugins
AssetPlugin- Asset loading and managementRenderPlugin- Graphics context and rendering (requires window)TextPlugin- Text rendering capabilitiesInputPlugin- Input state management
Dependencies
~15–41MB
~627K SLoC