Generic BackgroundWorkerPool<Req, Resp> with crossbeam channels, closure handlers, and 3 delivery strategies (Fallback, GracefulDegrade, ModalLock). Stub workers registered as Bevy resources: - ChunkGenWorker (2 threads) — terrain/props/navmesh generation - NpcPrepWorker (1 thread) — pre-compute NPC state for incoming areas - OffscreenTickWorker (1 thread) — advance NPCs outside active tier Tick loop integration: - PreInput: poll_worker_results drains completed work - PostSnapshot: push_worker_requests queues new work (no-op until Phase 5) Handlers are stubs — real computation plugs in when the phases that need them arrive. The infrastructure (channels, threads, push/poll, shutdown) is real and tested. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
19 lines
551 B
Rust
19 lines
551 B
Rust
// The Settled Reach - Simulation Server
|
|
// Rust/bevy_ecs simulation server for D-010 client-server architecture
|
|
|
|
pub mod bridge;
|
|
pub mod cause_chain;
|
|
pub mod knowledge;
|
|
pub mod npc;
|
|
pub mod perception;
|
|
pub mod settings;
|
|
pub mod simulation;
|
|
pub mod storyteller;
|
|
pub mod tick_phases;
|
|
pub mod voice;
|
|
pub mod workers;
|
|
// test_world::reset is always compiled (used by simulation::input).
|
|
// Room definitions, constants, and setup_gauntlet are gated behind
|
|
// the "gauntlet" feature (default-on) to allow stripping from release builds.
|
|
pub mod test_world;
|