Detailed context for agents working in this repo. See CLAUDE.md for hard rules and verification commands.
core/-- Shared console framework (WASM runtime, rollback, netcode, inspection)library/-- Main native player binary (library UI + launcher)nethercore-zx/-- ZX console implementationshared/-- Types shared with platform backend (nethercore-platform)zx-common/-- ZX formats/ROM loader (also used by platform backend)include/-- FFI surface; canonical ZX FFI signatures live ininclude/zx.rstools/--nether-cli(build/pack/run), exporters, dev toolingdocs/book/-- mdBook game developer docsdocs/architecture/-- Internal architecture notesexamples/-- Example gamesxtask/-- Build orchestration (cargo xtask ...)
# Build + run
cargo build --release
cargo run # Player (library UI)
# Testing + quality
cargo test
cargo fmt
cargo clippy --all-targets -- -D warnings
# WASM target (for games/examples)
rustup target add wasm32-unknown-unknown
# xtask orchestration
cargo xtask build-examples
# mdBook (requires mdbook + mdbook-tabs)
cd docs/book && mdbook serveCargo aliases (see .cargo/config.toml):
cargo xtask ...-- alias torun --package xtask --cargo dev-- release build ofnethercore-zx+nether-cli
nethercore-platform/backenddepends onshared/andzx-common/via local path.- Coordinated changes must keep that repo building.
include/zx.rsis the ABI source of truth; update docs/examples when changing FFI.
- Determinism boundary:
update()and everything it calls must be pure. No wall-clock time, OS RNG, filesystem, network, or unordered iteration in simulation paths. - Rendering code lives in rendering paths only -- never mix simulation state mutations into render.
- Prefer
xtaskfor build orchestration over ad-hoc scripts.
- Forgetting
wasm32-unknown-unknowntarget when building examples. - Changing
shared/orzx-common/types without verifyingnethercore-platform/backendstill compiles. - Introducing non-determinism in code reachable from
update().