New API for supporting mut aliasing safety#1753
Open
Indra-db wants to merge 49 commits into
Open
Conversation
Contributor
Author
|
ci test, I expect a failure somewhere, I cannot run tests locally due to bake being problematic (see discord) |
Contributor
Author
|
all tests passing 🥳 |
Contributor
@Indra-db could you link the message, I think i also have similar issues |
Contributor
Author
|
Tldr, Sander told me to use |
Contributor
Author
|
@Reddy-dev this was my thread where I was dumping my experience (which I closed) |
Contributor
Author
|
update to latest main |
03f2a1c to
3e9b117
Compare
d4af765 to
82365c3
Compare
Owner
8f5ff7d to
cc8a6da
Compare
…OS_API_IMPL define
This reverts commit 8d8104d.
2b83d41 to
a02bb75
Compare
SanderMertens
requested changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR introduces:
FLECS_MUT_ALIAS_LOCKSdefine, so there is no performance impact when it’s not enabled.End users of this internal API must use it themselves and panic when the mut-alias guarantee is violated.
ecs_lock_target_tholds information about where the lock should be applied. For sparse components/IDs (sparse and/or non-fragmenting) it will use thecomponent_recordfor locking. For table-column components it will lock the individual column.