pragma_ecs
A pure-Rust Entity Component System for game engines and frameworks built on
pragma.core (pragma_core 1.x).
It owns no threads: systems — plain functions of View, Res, ResMut, Commands,
EventWriter and EventReader parameters — run as tasks of the pragma.core frame graph on the
engine's thread pool. Systems with disjoint access run in parallel; conflicting systems without
an explicit order are rejected when the Schedule is built, not discovered as a data race.
Components live in archetype tables; spawn_bundle puts an entity straight into its final
table. Structural changes from systems and events are applied at the end of the frame in a
fixed order, so a frame gives the same world on any number of workers. Added<T> /
Changed<T> filters see what changed since a query or system last ran.
use ;
use ;
;
;
;
let mut world = new;
world.spawn_bundle?;
world.insert_resource;
let mut builder = builder;
builder.add_system?;
let mut schedule = builder.build?;
let pool = new?;
schedule.run?; // once per frame
No unsafe, no panics in the library (typed #[non_exhaustive] errors), bounded allocations
(try_reserve → EcsError::OutOfMemory), pure-Rust dependencies. The crate documentation has
an "Integrating into an engine" section; the design, the decision log and the benchmarks against
hecs and bevy_ecs are in the
repository.
License: MIT.