My systems run under a static scheduler, which I'm planning to open source: every system's component accesses are known ahead of time, and only provably disjoint systems ever run together. query()'s dynamic borrow checks can therefore never fail.
Wanted to know what you think about adding World::query_unchecked, so a query can skip the dynamic borrow checks when the caller already guarantees exclusivity.
/// Like `query_mut`, but unchecked.
/// # Safety
/// Caller must guarantee exclusive access to the archetypes `Q` matches.
pub unsafe fn query_unchecked<Q: Query>(&self) -> QueryMut<'_, Q>;
I realize that this is pretty niche. Draft PR: #444
My systems run under a static scheduler, which I'm planning to open source: every system's component accesses are known ahead of time, and only provably disjoint systems ever run together.
query()'sdynamic borrow checks can therefore never fail.Wanted to know what you think about adding
World::query_unchecked, so a query can skip the dynamic borrow checks when the caller already guarantees exclusivity.I realize that this is pretty niche. Draft PR: #444