[package]
name = "holtburger-core"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
holtburger-common.workspace = true
holtburger-content.workspace = true
holtburger-dat.workspace = true
holtburger-protocol.workspace = true
holtburger-session.workspace = true
holtburger-world.workspace = true
tokio = { workspace = true, features = ["rt", "sync", "macros", "time"] }
byteorder.workspace = true
anyhow.workspace = true
rand.workspace = true
log.workspace = true
encoding_rs.workspace = true
binrw.workspace = true
serde.workspace = true
thiserror.workspace = true
glam.workspace = true
bitflags.workspace = true
async-trait.workspace = true
strum.workspace = true
strum_macros.workspace = true
# Phase 4 step 3.6 — wasm-friendly Instant for MovementSystem hot path
# and ClientRuntime time comparisons. Native re-exports std::time::Instant.
web-time = { workspace = true }

# Native-only: hostname resolution via `tokio::net::lookup_host`. Used
# only by `ClientRuntimeBuilder::connect`, which is itself native-gated
# (it calls the UDP-bound `Session::new`). Wasm32 builds will receive a
# pre-resolved endpoint from JS and construct sessions via
# `Session::new_with_transport`.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { workspace = true, features = ["net"] }

# Wasm32 transitive: `rand` v0.10 pulls `getrandom` v0.4, which on
# `wasm32-unknown-unknown` requires the `wasm_js` feature to opt in to
# the `crypto.getRandomValues` JS shim. Without this the build dies with
# `getrandom`'s `compile_error!` (see docs/phase-2-wasm-spike.md §6).
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.4", features = ["wasm_js"] }

[dev-dependencies]
hex.workspace = true
tempfile.workspace = true
holtburger-dat.workspace = true
holtburger-world = { workspace = true, features = ["test-support"] }
