feat(simulation): multi-threaded executor + EntityRng (#843 Part B)

Enable Bevy multi-threaded executor via bevy_tasks multi_threaded
feature. Systems within the same TickPhase that don't share mutable
resources now run in parallel automatically.

Add EntityRng component — per-entity ChaCha20Rng seeded from
world_seed + StableId via splitmix64 mixing. More deterministic than
shared SimRng (order-independent). Migrate all monologue systems
(4 of 13 SimRng consumers) to EntityRng, removing contention that
serialized them against conversation/dialogue systems.

Add rayon dependency (infrastructure only, no par_iter calls yet).

SimRng retained for world-level randomness: conversation pairing,
knowledge transfer, dialogue, ticker, storyteller.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-11 00:08:41 +02:00
co-authored by Claude Opus 4.6
parent 309c05d441
commit 2175e9b31c
5 changed files with 128 additions and 19 deletions
+2
View File
@@ -6,6 +6,8 @@ edition = "2021"
[dependencies]
bevy_ecs = "0.18"
bevy_app = "0.18"
bevy_tasks = { version = "0.18", features = ["multi_threaded"] }
rayon = "1"
serde = { version = "1", features = ["derive"] }
serde_yaml = "0.9"
ron = "0.8"