Repository navigation
make MutableVec and MutableBTreeMap lock-free and more ECS-native, removing the need to flush, plus some misc. - #10
Merged
Merged
Conversation
MutableVec and MutableBTreeMapMutableVec and MutableBTreeMap lock-free and more ECS-native, removing the need to flush
There was a problem hiding this comment.
Pull Request Overview
This PR transforms MutableVec and MutableBTreeMap from lock-based structures requiring manual flushing into ECS-native components that automatically propagate changes through the signal graph.
Key Changes:
- Replaced
Arc<RwLock<State>>with entity-based storage usingMutableVecData/MutableBTreeMapDatacomponents - Introduced
MutableVecBuilder/MutableBTreeMapBuilderfor initialization withspawn()methods - Eliminated manual
flush()calls - changes now propagate automatically via ECS change detection - Added reference counting with automatic entity cleanup on drop
Reviewed Changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/utils.rs | Added Deref implementation for LazyEntity and constant for error message |
| src/signal_map.rs | Converted MutableBTreeMap to ECS-based storage with builder pattern, removed flush methods, updated examples |
| src/signal.rs | Renamed SignalClone to SignalDynClone, updated LazyEntity usage to use Deref, simplified doc examples |
| src/lib.rs | Made #![no_std] test-conditional, refactored plugin systems, added cleanup systems for stale entities |
| src/graph.rs | Renamed cleanup-related identifiers from CLEANUP_ to STALE_ |
| src/builder.rs | Added on_spawn_with_system, observe, and on_signal_with_entity methods |
| rustfmt.toml | Enabled format_code_in_doc_comments |
| repo_prompt.ncl | Added reference to new examples/letters.rs file |
| examples/test.rs | Updated to use builder pattern and removed flush calls |
| examples/lifetimes.rs | Updated to use builder pattern and removed flush calls |
| examples/letters.rs | Updated to use builder pattern and removed flush calls |
| examples/filters.rs | Updated to use builder pattern and removed flush calls |
| examples/counter.rs | Updated comment for clarity |
| README.md | Updated documentation examples |
| Cargo.toml | Added dev dependencies for testing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MutableVec and MutableBTreeMap lock-free and more ECS-native, removing the need to flushMutableVec and MutableBTreeMap lock-free and more ECS-native, removing the need to flush, plus some misc.
databasedav
marked this pull request as ready for review
October 28, 2025 06:12
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.
No description provided.