wyrd-for-games 0.4.0

Engine-neutral signal-graph game logic for Wyrd
Documentation
//! Executable runtime: bind a validated Weave, sample senses, loom, read outbox.
//!
//! Lifecycle: [`Runtime::bind`] consumes a [`crate::Weave`] into dense
//! buffers and intern tables. Each frame: host writes senses via
//! [`PortWriter`], [`Runtime::begin_frame`] + [`Runtime::loom`] settle once,
//! host applies [`Outbox`] (`SignalOut` / `EmitCommand`). No engine types cross
//! this boundary — dense `SenseId` / `HostPathId` / `CmdId` only on the hot path.
//!
//! Executable learning material lives in [`crate::examples`] rather than the
//! runtime API.

pub(crate) mod bind;
pub(crate) mod error;
pub(crate) mod handles;
pub(crate) mod host;
pub(crate) mod kind_tag;
pub(crate) mod loom;
pub(crate) mod outbox;
pub(crate) mod recipe;
pub(crate) mod runtime_state;
pub(crate) mod scenario;

pub use bind::{BindOpts, Runtime};
pub use error::{
    BindError, BindRestoreError, HandleError, PresetError, RecipeEndpoint, RecipeError,
    RecipeResolveError, RestoreError, ScenarioError,
};
pub use handles::{CmdId, HostPathId, KnotHandle, SenseId};
pub use host::{
    append_commands, outbox_to_commands, tick_once, Host, HostCommand, NullHost, ScriptedHost,
};
pub use outbox::{Emit, Outbox, PortWriter, SignalOutSample};
pub use recipe::{
    EmitCommandManifest, Recipe, RecipeInstance, RecipeManifest, SignalInManifest,
    SignalOutManifest,
};
#[cfg(feature = "serde-json")]
pub use runtime_state::{
    runtime_state_from_json, runtime_state_to_json, RuntimeStateJsonCodecError,
};
#[cfg(feature = "serde-ron")]
pub use runtime_state::{runtime_state_from_ron, runtime_state_to_ron, RuntimeStateRonCodecError};
pub use runtime_state::{
    RuntimePreset, RuntimePresetEntry, RuntimeState, RuntimeStateEntry, RuntimeStateReport,
    RUNTIME_STATE_FORMAT_VERSION,
};
pub use scenario::Scenario;