SectorSync
SectorSync is dependency-light Rust middleware for spatial, real-time entity replication across large maps and multiple simulation stations. It provides bounded, embeddable primitives without imposing a game engine, ECS, gateway process, async runtime, or cluster platform.
Capabilities
- Deterministic 3D cell indexing, AOI queries, visibility hooks, and allocation-light movement updates.
- Single-owner authority, read-only ghosts, handoff, snapshots, barriers, and cell migration primitives.
- Compiled cadence, priority, visibility, and byte-budget replication planning with caller-owned reusable scratch.
- Bounded command, event, replication, gateway, deployment-route, and tracking state with explicit backpressure.
- Binary wire frames plus in-memory, reliable-packet, security-hook, and non-blocking UDP adapters.
- Runtime load sampling, conservative hotspot splitting, and deterministic station scheduling.
- Adaptive small/large collection paths and reusable buffers for multi-room, single-process deployments.
- Guarded, machine-readable benchmarks for latency, bytes, queue pressure, scheduler decisions, and retained capacity.
SectorSync owns synchronization mechanics, not game semantics. Authentication, anti-cheat, matchmaking, gameplay state, persistence, process orchestration, service discovery, production cryptography, and GPU execution remain with the embedding application. See Production adapter boundaries.
Requirements
- Rust 1.88 or newer with Edition 2024 support.
- No operating-system service, database, or mandatory runtime dependency.
Installation
Use only the layers needed by the application:
[]
= "=2026.712.0"
= "=2026.712.0"
= "=2026.712.0"
= "=2026.712.0"
sectorsync-core works independently. Higher layers add wire, transport, and
runtime integration without introducing a mandatory ECS, async runtime, or
network service.
Optional performance features are explicit:
= { = "=2026.712.0", = ["simd"] }
= { = "=2026.712.0", = ["parallel"] }
simd enables the safe range-only SIMD candidate path. parallel exposes a
bounded replication pool and deterministic parallel station planning. Neither
feature creates hidden threads in the default build.
Quick Start
use ;
let mut station = new;
let mut index = new;
let position = new;
let handle = station
.spawn_owned
.expect;
index.upsert;
assert_eq!;
Run the complete validated command-to-replication flow:
The SDK integration guide covers bootstrap, per-tick ordering, ownership, bounded failures, barriers, migration, and observability.
Workspace
| Crate | Purpose |
|---|---|
sectorsync-core |
Spatial index, authority, components, policy, replication, snapshots |
sectorsync-wire |
Bounded binary frame encoding and decoding |
sectorsync-transport |
In-memory, reliable-packet, security-hook, and UDP adapters |
sectorsync-runtime |
Bridges, gateway routing, barriers, load sampling, scheduling, migration |
sectorsync-bench |
Executable examples and guarded performance acceptance runner |
The four library crates share one exact workspace version and publish in dependency order: core, wire, transport, then runtime.
Performance
Run the bounded smoke acceptance profile:
The benchmark emits machine-readable latency, selection, byte, queue,
replication, scheduler, threshold, and benchmark_ok fields. Medium, large,
and oversized manual workloads require explicit --allow-heavy opt-in.
The guarded many-room example models independent room instances and sequential single-process work:
The deterministic gameplay-shaped scenario adds active/idle/hot room mixes, commands, movement, component changes, projectiles, events, frame transport, client decode, ACK tracking, and bounded room recreation:
On the current development host, its default 500-room workload has demonstrated 30 Hz headroom for spatial planning and direct delta encoding. This excludes gameplay, room lifecycle, persistence, matchmaking, and kernel networking, so it is regression evidence rather than a production capacity guarantee.
Benchmark profiles, baselines, A/B commands, measurements, and interpretation rules live in the performance acceptance matrix.
Documentation
Start with the documentation index:
- SDK integration guide: application ownership, bootstrap, tick flow, failures, and executable examples.
- Performance acceptance matrix: guarded profiles, thresholds, A/B evidence, and heavy calibration.
- Production adapter boundaries: security, transport, routing, persistence, and infrastructure ownership.
- Delivery status: completed SDK scope, explicit non-goals, and criteria for future work.
Generate API documentation with:
Development
The release-quality gate is:
See CONTRIBUTING.md before submitting changes. Public SDK changes require focused tests and a relevant executable example. Routine verification stays smoke-safe; heavier performance runs must be deliberate.
Versioning
SectorSync uses calendar versions in YYYY.MMDD.REVISION form with an unpadded
numeric MMDD field. The date identifies a release and does not claim semantic
API compatibility. Workspace dependencies remain exact and equal; review the
release notes before upgrading.
Authority, boundedness, and explicit-state invariants remain compatibility commitments.
Security and License
Report vulnerabilities through the private process in SECURITY.md, not a public issue. SectorSync is available under the MIT License.