Skip to main content

Crate wowlab_common

Crate wowlab_common 

Source
Expand description

Shared runtime, configuration, presentation, retry, time, and node-protocol utilities for WoW Lab.

Modules§

casing 🔒
cli
Shared CLI bootstrap utilities.
env 🔒
fmt
markdown
mermaid
node_http
HTTP wire contracts shared by simulation nodes and Sentinel.
node_public_key 🔒
node_realtime 🔒
Realtime messages shared by simulation nodes and Sentinel.
output
Shared CLI output formatting.
prompt
Interactive CLI prompts with consistent styling.
retry
Deterministic retry-delay schedules without transport policy or sleeping.
runtime 🔒
Runtime work-expansion protocol shared by sentinel and node; payloads serialize as camelCase JSON.
sim
Simulation config building and parsing.
sys
Platform-specific system information: CPU, memory, load averages.
time
Cross-platform time helpers via web-time (native and wasm).

Structs§

ClaimToken
Opaque claim token (UUID string) issued by sentinel when it assigns a chunk.
EnvError
Errors raised by environment-variable helpers in this crate.
EnvLoader
Loads environment variables with a common prefix, supporting required, optional, and secret values.
InvalidNodePublicKey
Error returned when a base64 string cannot be decoded into a valid 32-byte public key.
NodePublicKey
A node’s Ed25519 public key (32 bytes, base64-encoded for display/storage).
ProcessEnvironment
Adapter backed by the current process environment.
ProjectIdentity
Identifies an application for platform-specific project directories.
RuntimeChunkId
Monotonic per-job identifier for a runtime chunk (a batch of work items).
RuntimeChunkPayload
A batch of work items assigned to one node in one Centrifuge publication.
RuntimeWorkItem
One abstract unit of work in a runtime chunk, derived from kind and routed by tag.
RuntimeWorkResult
Compact result for one executed work item, mirroring the BatchWorkResult proto.
WorkContextHash
SHA-256 digest of (base_sim_config, TournamentPayload, sentinel_config), serialized as lowercase hex.
WorkContextHashParseError
Error returned when a WorkContextHash hex string is malformed.

Enums§

NodeRealtimeMessage
Message published on a node’s nodes:{public_key} realtime channel.
RuntimeWorkFidelity
Result fidelity requested for a work item.
RuntimeWorkItemKind
What a work item evaluates, carrying the parameters needed to derive a concrete sim config.

Traits§

Environment
Source of process-style key/value configuration.

Functions§

config_dir
Return the platform-specific config directory, checking an env override first.
data_dir
Return the platform-specific data directory, checking an env override first.
ensure_query_param
Append a query parameter to a URL if it is not already present.
env_or
Read an environment variable, returning a default if not set.
env_or_with
Read a value through an injected environment, returning a default when absent.
get_raw_env
Read an unprefixed value from the process environment.
require_env
Read a required environment variable.
require_env_with
Read a required value through an injected environment.
snake_to_camel
Convert a snake_case identifier to camelCase.