https://github.com/kettle11/kudo
An Entity Component System for Rust. Fast, easy, and predictable. (Work in progress)
https://github.com/kettle11/kudo
ecs entity-component-system gamedev rust
Last synced: about 1 year ago
JSON representation
An Entity Component System for Rust. Fast, easy, and predictable. (Work in progress)
- Host: GitHub
- URL: https://github.com/kettle11/kudo
- Owner: kettle11
- License: zlib
- Created: 2020-08-20T06:23:25.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2022-02-25T16:49:38.000Z (over 4 years ago)
- Last Synced: 2025-03-29T16:34:26.725Z (over 1 year ago)
- Topics: ecs, entity-component-system, gamedev, rust
- Language: Rust
- Homepage:
- Size: 592 KB
- Stars: 23
- Watchers: 3
- Forks: 3
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## This repository is no longer maintained. But `kudo` lives on as a crate within the `koi` game engine project: https://github.com/kettle11/koi/tree/main/crates/kecs
# 👏 kudo
[](https://docs.rs/kudo/)
[](https://crates.io/crates/kudo)
[](https://opensource.org/licenses/Zlib)
## WORK IN PROGRESS
An Entity Component System for Rust. Fast, easy, and predictable.
* No `unsafe`
* No dependencies
```rust
struct Health(f32);
struct Name(String);
struct CreepySnakeHair(u32);
let mut world = World::new();
// Create entities with components.
world.spawn((Name("Perseus".to_string()), Health(50.)));
world.spawn((
Name("Medusa".to_string()),
Health(100.),
CreepySnakeHair(300),
));
// Find every entity with a `Name` and a `Health` component.
let mut query = world.query::<(&Name, &Health)>().unwrap();
// Iterate through all entities with those components.
for (name, health) in query.iter() {
println!("{}'s health is: {:?}", name.0, health.0);
}
```
`Kudo` was inspired by the library [`hecs`](https://github.com/Ralith/hecs). If you need a more feature-rich ECS, give `hecs` a try!