You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't actually a memory safety problem because hecs also has runtime safety checks, but in some contexts it is useful to provide "immutable only" world references. For example, render graph nodes currently receive an &World reference, which was intended to be an immutable-only reference. Graph nodes are scheduled to run in parallel based on graph dependencies, so mutable access to components could cause undefined behavior. With legion &World was truly immutable. Which hecs, &World is "mutable with runtime safety checks".
To fix this i think we have two choices:
modify World to label unsafe access as literally "unsafe"
add an ImmutableWorld wrapper that only allows read actions
The text was updated successfully, but these errors were encountered:
For what it's worth, I opted for a wrapper to solve a similar problem in yaks (I wanted to disallow doing anything that would break invariants the executor assumes within a system).
fixesbevyengine#81
ignore comment markers in `"` quotes (unless the quote is already in a
comment).
also fix `*/` incorrectly stripping the marker and returning ` `, and
`/* //*` failing to recognise the second block start marker (thanks
@stefnotch for the tests).
---------
Co-authored-by: stefnotch <stefnotch@users.noreply.github.com>
This isn't actually a memory safety problem because hecs also has runtime safety checks, but in some contexts it is useful to provide "immutable only" world references. For example, render graph nodes currently receive an
&World
reference, which was intended to be an immutable-only reference. Graph nodes are scheduled to run in parallel based on graph dependencies, so mutable access to components could cause undefined behavior. With legion &World was truly immutable. Which hecs, &World is "mutable with runtime safety checks".To fix this i think we have two choices:
ImmutableWorld
wrapper that only allows read actionsThe text was updated successfully, but these errors were encountered: