Skip to content

Per world access lists and utils #17198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
122e9fe
added UniversalAccess and made FilteredAcceessSet universal
ElliottjPierce Jan 1, 2025
2b7fb2c
adapted scheduler to new access system
ElliottjPierce Jan 2, 2025
ee754e8
ported most system utils to universal access
ElliottjPierce Jan 2, 2025
ec3d1b9
ported SystemParam to universal access
ElliottjPierce Jan 2, 2025
4cf6646
ported builders to universal access
ElliottjPierce Jan 2, 2025
a6b466d
fixed a few warnings
ElliottjPierce Jan 2, 2025
731a5b2
cleanup for ci
ElliottjPierce Jan 2, 2025
0d3ae4c
an initial implementation of links
ElliottjPierce Jan 3, 2025
a78bd92
linked params get updated archetypes
ElliottjPierce Jan 3, 2025
70b784f
api for managing links
ElliottjPierce Jan 3, 2025
cd92fbe
added safety note
ElliottjPierce Jan 3, 2025
f96128c
added a very basic test to demo
ElliottjPierce Jan 3, 2025
a6ba919
documented safety to Linked access for an edge case
ElliottjPierce Jan 6, 2025
233f9e0
polish to make most ci pass
ElliottjPierce Jan 6, 2025
2189494
Merge branch 'main' into per-world_access_lists_and_utils
ElliottjPierce Jan 6, 2025
c400726
fixed some typos and formatting
ElliottjPierce Jan 6, 2025
e6032fb
Merge branch 'main' into per-world_access_lists_and_utils
ElliottjPierce Jan 15, 2025
d422d48
added back [allow(unused_unsafe)]
ElliottjPierce Jan 15, 2025
b31557e
Revert "added back [allow(unused_unsafe)]"
ElliottjPierce Jan 15, 2025
80afd38
Cleaned up system param after merge conflict.
ElliottjPierce Jan 15, 2025
ab5201b
Merge branch 'main' into per-world_access_lists_and_utils
ElliottjPierce Jan 21, 2025
2b8a06a
toml formatting
ElliottjPierce Jan 21, 2025
b10e1ab
Merge branch 'main' into per-world_access_lists_and_utils
ElliottjPierce Jan 22, 2025
c27f575
removed incorrect use
ElliottjPierce Jan 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion crates/bevy_ecs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ derive_more = { version = "1", default-features = false, features = [
] }
nonmax = { version = "0.5", default-features = false }
arrayvec = { version = "0.7.4", default-features = false, optional = true }
smallvec = { version = "1", features = ["union", "const_generics"] }
smallvec = { version = "1", features = [
"union",
"const_generics",
"const_new",
] }
indexmap = { version = "2.5.0", default-features = false }
variadics_please = { version = "1.1", default-features = false }
spin = { version = "0.9.8", default-features = false, features = [
Expand Down
5 changes: 5 additions & 0 deletions crates/bevy_ecs/macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,11 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream {
unsafe { <#fields_alias::<'_, '_, #punctuated_generic_idents> as #path::system::SystemParam>::new_archetype(&mut state.state, archetype, system_meta) }
}

unsafe fn update_meta(state: &mut Self::State, world: #path::world::unsafe_world_cell::UnsafeWorldCell, system_meta: &mut #path::system::SystemMeta) {
// SAFETY: The caller ensures that `archetype` is from the World the state was initialized from in `init_state`.
unsafe { <#fields_alias::<'_, '_, #punctuated_generic_idents> as #path::system::SystemParam>::update_meta(&mut state.state, world, system_meta) }
}

fn apply(state: &mut Self::State, system_meta: &#path::system::SystemMeta, world: &mut #path::world::World) {
<#fields_alias::<'_, '_, #punctuated_generic_idents> as #path::system::SystemParam>::apply(&mut state.state, system_meta, world);
}
Expand Down
Loading
Loading