- Dynamic scheduling now respects both
EntryViews
andResourceViews
. - Mutating a deserialized
World
no longer creates duplicateArchetype
s, instead correctly looking up the existing deserializedArchetype
.
resource::ContainsViews
now only requires a single generic parameter for indices.World::view_resources()
now only requires a single generic parameter for indices.registry::ContainsEntity
now only requires a single generic parameter for indices.World::insert()
now only requires a single generic parameter for indices.registry::ContainsEntities
now only requires a single generic parameter for indices.World::extend()
now only requires a single generic parameter for indices.World::insert()
no longer requiresE
to implementEntity
.World::extend()
no longer requiresE
to implementEntities
.World::query()
andWorld::par_query()
both no longer requireV
andF
to implementFilter
.registry::ContainsQuery
now only requires a single generic parameter for indices.registry::ContainsParQuery
now only requires a single generic parameter for indices.registry::ContainsViews
now only requires a single generic parameter for indices.World::query()
now only requires a single parameter for query indices.Entry::query()
now only requires a single parameter for query indices.World::run_system()
now only requires a single parameter for query indices.World::run_par_system()
now only requires a single parameter for query indices.World::run_schedule()
now only requires a single parameter for query indices.query::view::Disjoint
now only requires a single parameter for indices.System::run()
now takes the results iterator as a generic parameterI
to simplify the interface.ParSystem::run()
now takes the results parallel iterator as a generic parameterI
to simplify the interface.System
andParSystem
both no longer requireFilter
andViews
to implementFilter
.result::Iter
no longer requiresV
andF
to implementFilter
.Entry::query()
no longer requiresV
andF
to implementFilter
.system::schedule::Schedule
now only requires a single parameter for indices.World::run_system()
now only requires a single parameter for schedule indices.
Schedule
s can now no longer access non-Sync
components and resources.- Multiple calls to
Entry::add()
orEntry::remove()
that change the shape of the entity now no longer accesses the wrong internal entity row, preventing potential undefined behavior.
Entry::query()
now requires a less-strict lifetime.
registry::ContainsViews
is now a public trait.
view::ContainsFilter
trait to indicate that a filter can be expressed over a view.
query::Entry::query()
is now bound onRegistry
implementingContainsViews<Views>
over the superviewViews
, instead of theSubViews
.query::Entry::query()
is now bound onViews
implementingview::ContainsFilter<Filter
.view::SubSet
is no longer required to be generic overRegistry
.
- Entries can now be accessed from within
System::run()
andParSystem::run()
.
query::Entries
struct to allow access to certain component columns through anEntry
API.query::Entry
struct to allow access to an individual entity's components, respecting a restricting superset of views.view::SubSet
trait, defining oneViews
as a subset of another.view::Disjoint
trait, defining twoViews
as being non-conflicting.
- Queries can now contain an
EntryViews
parameter, specifying component columns that can be accessed through anEntry
API. query::Result
now includes anentries
field, containing aquery::Entries
struct giving entry access to the components queried withEntryViews
.System
andParSystem
now each have anEntryViews
associated type.System
andParSystem
'srun()
method now takes one argument, which is simply aquery::Result
.- Scheduling now takes into account a system's
EntryViews
when creating stages.
- Querying with empty component views no longer iterates endlessly. It now iterates once for each entity filtered, despite no components being viewed.
resource
module containing types related to resources.resource::Resource
trait to define a type as a resource.resource::Resources
trait to define a heterogeneous list of types as a list of resources.resources!
macro to define a heterogeneous list of resources.Resources!
macro to define the type of a heterogeneous list of resources.query::Result
struct containing the result of a query on aWorld
.World::with_resources()
function to define aWorld
containing resources.World::get()
method to get an immutable reference to a resource.World::get_mut()
method to get a mutable reference to a resource.World::view_resources()
to get references to any number of resources at once.resource::Null
type which defines the end of a heterogeneous list of resources.resource::ContainsResource
trait to indicate that a heterogeneous list of resources contains a given resource.resource::ContainsViews
trait to indicate that a heterogeneous list of resource views is contained in a list of resources.resource::Debug
trait, implemented on lists of resources that implementcore::fmt::Debug
.resource::Serialize
trait, implemented on lists of resources that implementserde::Serialize
.resource::Deserialize
trait, implemented on lists of resources that implementserde::Deserialize
.
- Running a schedule now performs optimizations at run-time. Tasks that can be are now run earlier than their compile-time scheduled stage.
World::query()
andWorld::par_query()
now return aquery::Result
struct.Query
has an addedResourceViews
generic parameter to indicate the resources that should be viewed during the query.System
andParSystem
now have aResourceViews
associated type to indicate the resources that should be viewed when the system is run.System::run()
andParSystem::run()
have a newSelf::ViewResources
parameter to allow accessing those resources during execution.- Scheduling multiple systems now accounts for
ResourceViews
alongside componentViews
when creating stages. - The
Debug
implementation onWorld
now requires theWorld
's resources to implementresource::Debug
. - The
Serialize
andDeserialize
implementations onWorld
now requireWorld
's resources to implementresource::Serialize
andresource::Deserialize
, respectively. - The
Clone
,Default
,PartialEq
,Eq
,Send
, andSync
implementations onWorld
now require theWorld's
resources to implement those same traits.
Entity!
macro for defining the type of an entity.reserve()
method onWorld
for reserving capacity for additional entities made up of a specific set of components.
System::world_post_processing()
andParSystem::world_post_processing()
.
Debug
,Eq
,PartialEq
,Serialize
, andDeserialize
traits are added to theregistry
module.schedule!
macro for defining a schedule.Schedule!
macro for defining the type of a schedule.schedule::task
module for defining tasks that make up schedules.Clone
implementation forWorld
.
Send
andSync
implementations ofWorld
now only require the registry to implementRegistry + Send
andRegistry + Sync
respectively.- Lifetime in
System
andParSystem
traits has been moved to theViews
associated type. - The generic lifetimes on the
system::schedule::RawTask
andsystem::Stages
traits have been removed. Registry
is now explicitly bound to thestatic
lifetime. This was previously only implicit, withRegistry
s being made ofComponent
s which were bound to'static
.- Both
System
andParSystem
no longer require a lifetime bound on theRegistry
R
in theirrun()
methods. Schedule
has been changed from astruct
to atrait
.- Schedules now have their stages defined at compile-time.
registry!
macro has been renamed toRegistry!
to indicate that it is intended to be a type-level macro.views!
macro has been renamed toViews!
to indicate that it is intended to be a type-level macro.
system::Null
is removed, since it is no longer needed for defining aSchedule
.schedule::Builder
is removed, since it is no longer needed for defining aSchedule
.- The
schedule::raw_task
module has been removed. There is now no distinction between a raw task and a regular task. - The
schedule::stage
module has been removed. It still exists as part of the private API, but is no longer exposed publicly. - The
schedule::stages!
macro is removed. Schedules are no longer defined in terms of their stages directly, but are defined in terms of their tasks using theschedule!
andSchedule!
macros.
- Mitigated potential bug regarding the way non-root macros are exported when compiling documentation. Previously, a change in Rust's experimental
macro
syntax could have potentially broken usage of the library for all users. Now, a change in the syntax will only break building of the documentation (using--cfg doc_cfg
), which is acceptable. World::shrink_to_fit()
is no longer unsound. There were issues previously with it improperly deleting archetypes.
shrink_to_fit()
method onWorld
for shrinking theWorld
's current allocation to the minimum required for the current data.ContainsComponent
,ContainsEntities
,ContainsEntity
,ContainsParQuery
, andContainsQuery
traits to indicate more specific bounds on registries.
- Removed unnecessary generic bounds on
result::Iter
,result::ParIter
, andentities::Batch
. - Simplified trait bounds on
System::run()
andParSystem::run()
, improving usability for users implementing these traits. - Renamed
Seal
traits toSealed
to match common convention.
- Memory is no longer leaked after clearing a populated
World
and then extending a previously populated archetype. - Traits with bounds on internal traits are now properly sealed.
stages!
macro now correctly parsessystem
command with no trailing comma.
query()
method onEntry
for viewing components of a single entity.- Documentation for some associated types and enum variants that was missing.
query()
andpar_query()
methods onWorld
now require aQuery
parameter.- Performance improvements through canonicalization of heterogeneous lists instead of internal type index hash tables.
insert()
,extend()
,query()
, andpar_query()
methods onWorld
now check at compile-time that components are contained within the registry.add()
andremove()
methods onEntry
now check at compile-time that components are contained within the registry.
registry!
declarative macro for easily defining a heterogeneous list of components making up a registry.World
for containing archetypal component data, generic over a registry of components.entity!
andentities!
declarative macro for easily defining heterogeneous lists of components making up entities.insert()
andextend()
methods onWorld
for storing entities of arbitrary components.views!
declarative macro for easily defining heterogeneous lists of views.- Various filter types for restricting what entities are viewed when querying.
query()
andpar_query()
methods onWorld
for viewing components of entities stored.System
andParSystem
traits allowing users to define systems.run_system()
andrun_par_system()
methods onWorld
for running user-defined systems.- Builder API for defining a
Schedule
at run-time. run_schedule()
method onWorld
for optimally running a schedule of systems.entity::Identifier
type for uniquely identifying a stored entity.contains()
method for checking whether an entity exists in aWorld
.remove()
method for removing an existing entity in aWorld
.entry()
method onWorld
for obtaining anEntry
for a contained entity.add()
andremove()
methods onEntry
for modifying an entity's components.clear()
method onWorld
for removing all entities.len()
andis_empty()
methods for determining how many entities are stored in aWorld
.serde
feature to enable serialization and deserialization ofWorld
.rayon
feature to enable parallel processing of components through the variouspar_
methods.