Entity Component System Library (ECS)
For info about why an ECS may be beneficial, see some of these articles:
There is a large variety of ways an ECS may work. This particular one is similar to Artemis. Although this isn't a port to Rust, most functionality should be similar, and the tutorials/manual there should be able to make up for the current lack of documentation [FIXME]
Here's the basic structure:
Entityis just an identifier. It contains no data or logic whatsoever.
Componentis a piece of data (eg: Position, Velocity, Colour). While containing logic can sometimes be useful, it's best practice to avoid it wherever possible.
Systemruns all the logic. Most of the time, it filters out entities based on their components, and only runs it's logic on the entities it's interested in. These filters are called
Aspects. Some systems ignore entities, and just apply logic to the world itself.
Aspectis a simple helper to filter entities based on their components.
Worldorganises all the above items together to make sure everything runs as it should.
Entity identifier and manager types.
Types to process the world and entities.