rhai's default feature set is ["std", "ahash/runtime-rng"]. The second half seeds hash maps from OS entropy, which is a run-to-run variation source living under a crate whose whole promise is byte-identical replays — and it pulls getrandom, which has no backend on wasm32-unknown-unknown, so the browser build could not compile at all. Dropping it leaves ahash on its compile-time seed. The canonical Neon Precinct playthrough produces byte-identical events before and after, and the suite is green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
33 lines
1.6 KiB
TOML
33 lines
1.6 KiB
TOML
[package]
|
|
name = "mrpci-core"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "MRPCI headless engine core — the SCI-generation sim: 256-color rooms, walkbox pathfinding, rhai scripts, and the command/event bus. Zero windowing dependencies: a compile error is the guardrail."
|
|
|
|
[dependencies]
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
image = { version = "0.24", default-features = false, features = ["png"] } # PNG-only: lean builds
|
|
# Room logic. "sync" keeps the engine Send+Sync (the HTTP surface shares
|
|
# GameState across threads); "no_time" bans wall-clock from scripts, so a
|
|
# replayed script is bit-identical — the whole CPU-speed-bug class, deleted.
|
|
#
|
|
# default-features = false drops exactly one thing from rhai's default set:
|
|
# `ahash/runtime-rng`, which seeds hash maps from the OS entropy pool. We
|
|
# want the compile-time seed instead — one less source of run-to-run
|
|
# variation under a crate whose whole promise is byte-identical replays —
|
|
# and it's also what makes wasm32-unknown-unknown build at all (runtime-rng
|
|
# pulls getrandom, which has no default backend there). "std" is the rest of
|
|
# rhai's default and stays on.
|
|
rhai = { version = "1", default-features = false, features = ["std", "sync", "no_time"] }
|
|
|
|
# Native-only: the HTTP surface and the AI parser lane don't exist in
|
|
# browser builds (wasm gets the deterministic parser and bundles).
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
tiny_http = "0.12" # the --serve control surface
|
|
ureq = { version = "2", features = ["json", "tls"] } # AI parser lane: Ollama / OpenRouter HTTP
|
|
|
|
[[bin]]
|
|
name = "mrpci-headless"
|
|
path = "src/bin/mrpci-headless/main.rs"
|