Rusting2D is a simple 2D engine written in Rust, designed as a learning project. Its primary goal is to explore the development of graphical engines using modern tools like wgpu and winit. This project is under constant evolution, and breaking changes may occur frequently.
Rusting2D is not recommended for production.
If you're looking for more robust and mature solutions, consider these alternatives:
- Bevy: A modern ECS-based game engine written in Rust.
- Good Rust Game Engines: A curated list of game engines available in the Rust ecosystem.
Rusting2D is experimental and serves as a platform for learning and experimentation.
- Window and event handling: Managed with
winit
. - Basic 2D rendering: Leveraging
wgpu
for low-level graphics. - Entity system: Basic support for creating and managing entities.
- Focus on learning: Built to understand and explore underlying technologies.
Add Rusting2D as a dependency in your Cargo.toml
(published on Crates.io):
[dependencies]
rusting2d = "0.0.1"
Alternatively, clone the repository to explore and modify the code directly.
use rusting2d::{Engine, Entity};
#[tokio::main]
async fn main() {
// Create the engine with a window.
let mut engine = Engine::new("My 2D Engine", 800, 600).await;
// Add a basic entity.
engine.add_entity(Entity {
id: 0,
name: "Player".to_string(),
});
// Run the engine.
engine.run();
}
Run tests with:
cargo test
Generate documentation locally:
cargo doc --open
This project is a learning space. If you encounter bugs or have ideas for improvements, feel free to open a Pull Request or file an issue.
Rusting2D is available under the MIT OR Apache-2.0 license.
As the project is in constant evolution, significant changes may be introduced without prior notice. For production-grade projects, it is recommended to use mature alternatives like those mentioned above.