Glossary

termexplanationexample
entitysomething that can have components and relationships
componenta struct attached to an entityHealth (Health is a normal Rust type)
relationa connection between two entitiesFriends(a,b) (Friends is a normal Rust type)
variablea standin for an entity in a queryHealth(a) <- a is a variable
component access
mut component access
singletonsomething that only exists once in a Worldworld.singleton::<GameTicks>()
outvarentity variable that should be returned by the query&this
invara value for an entity that is passed into a queryHealth(\*me)
constraintsomething that filters out results from a querythis != that
uncomponentnegative component constraint, filters out results where var has component!Health
unrelationnegative relation constraint, filters out results where Relation is present!ChildOf(this, other)
createcreates an entity or entityviewlet e = world.create()
destroyremoves an entity and cleans up its relations and componentse.destroy()
addadds a component to an entitye.add(Comp{})
removeremoves a component from an entitye.remove::<Comp>()
relatecreates a relation between two entitiesa.relate<sub>to</sub>::<Friend>(b)
unrelateremoves a relation between two entitiesa.unrelate_to_::<Friend>(b)
immediatea change of entities, components or relations is immediately executede.add(Comp{}); (with a mutable EntityView)
deferreda change is queued up until World::process() is callede.add(Comp{}); (with a EntityViewDeferred)
exclusiveRel(a,b) gets removed when Rel(a,c) is created
reflexiveRel(a,b) also means Rel(b,a)
transitiveRel(a,b) and Rel(b,c) means Rel(a,c) implicitly
cascading deletewhen a from Rel(a,b) gets destroyed, then b also gets destroyed