concinnity-engine 0.19.119

Runtime engine for Concinnity: ECS schedule, graphics, spawn, streaming
//! The runtime crate. Holds the world loop, the ECS schedule, the
//! GraphicsSystem renderer driver, and audio. Physics and behavior evaluation
//! live in `concinnity_core`; this crate drives them, lending them a job pool
//! and a save directory. The GPU-free render-prep lives in
//! `concinnity_core::render` and the hardware backends (Metal/DirectX/Vulkan/
//! Win32) in concinnity-device; this crate drives them through a
//! `Box<dyn RenderBackend>` from `concinnity_device::init_backend` and never
//! names a concrete backend. Depends on concinnity-core and concinnity-device
//! (no concinnity-cook, no image decoders). A host that edits a running world
//! (the editor crate, concinnity-dev) does it through [`live_edit`], the one
//! contract for live editing; everything else it drives is the ordinary host
//! API.
pub mod blob;
pub mod ecs;
mod heap;

#[cfg(test)]
mod bench;

// The access-declaration mask builders, reached crate-wide as
// `crate::component_mask!` / `crate::resource_mask!`.
pub(crate) use ecs::access_ids::{component_mask, resource_mask};

pub mod app;
// Flat entry point for a shipped player: classify the path a world sits at and
// run it. The runtime bin calls `concinnity_engine::run_from` rather than
// reaching through the `app::run` module path.
pub use app::resolved_blob::{ResolvedBlob, blob_source};
pub use app::run::{BlobSource, run_from};
// The surface a host embeds: construct a Runtime, populate its world, and
// drive it with `Runtime::run` / `Runtime::run_with`. Exported flat so the
// `concinnity` facade crate re-exports these under its own root.
pub use app::run::{PipelineMode, RunOptions, init_logging};
pub use app::runtime::Runtime;
pub use app::startup_error::StartupError;
pub use blob::WorldLoadError;
// The state tree a host builds and hands down: where the blobs are read from
// and where saves, settings, crash reports and caches are written. Exported
// beside `run_from` so the runtime bin's entire entry API lives on this crate.
pub use concinnity_host::store::paths;
pub use concinnity_host::store::paths::StateTree;

/// The shader platform this build's rendering backend consumes. The backend is
/// this crate's own compile-time choice, so the crate that knows it is the one
/// that states it: the editor and the cook are handed the value rather than
/// resolving a backend of their own.
pub mod platform;

mod device;
/// Whether this build links a rendering backend. A build with no backend
/// feature has none, so the only loop that can run a world is a headless one.
pub use device::AVAILABLE as HAS_RENDER_BACKEND;
// Skeletal animation playback. Internal system, constructed by `World::start`
// when the world declares any `Animation`; produces per-frame skinning matrices.
pub(crate) mod animation;
// Name-addressed control of a running world's animation between steps, reached
// through `ecs::animation_system_mut`.
pub use animation::{AnimationSystem, GraphStateReport};
pub(crate) mod cbor_file;
pub(crate) mod config;
/// Camera controllers: the internal systems that turn input into camera and
/// player motion. `pub` so the editor crate can name the first-person controller.
pub mod controller;
/// Crash reporting: panic hook, native fault capture, local report files.
/// `pub` so the binaries install the hooks and the editor composes the
/// recent-log ring layer into its tracing subscriber.
pub mod crash;
pub mod shutdown;
// 3D positional sound and screen-triggered cues, and the one module that names
// kira.
pub(crate) mod audio;
// The standalone startup-error window, shown when a fatal startup failure
// happens before any world exists.
pub(crate) mod error_screen;
pub mod frame_report;
pub mod gfx;
pub(crate) mod hud;
pub(crate) mod input;
pub mod live_edit;
// The rigid-body simulation driver: builds a `concinnity_core::physics::Simulation`
// from the world's physics content and steps it on the fixed tick.
pub(crate) mod physics;
// The user-facing settings registry and the system that applies setting
// changes.
pub(crate) mod settings;
// Declarative logic (Behavior components + the shared world variables
// store), scheduled before SpawnSystem so its requests apply the same tick.
pub(crate) mod behavior;
/// Runtime resource tables (per-kind, handle-indexed views of the blob's resource
/// stream). `pub` so the editor's in-memory build path can construct the tables it
/// inserts into the world, mirroring the shipped-runtime loader.
pub mod resource;
// Runtime entity churn (Lifetime/Spawner ticks + spawn/despawn/reparent
// drains), scheduled immediately before GraphicsSystem.
pub(crate) mod spawn;
pub(crate) mod story;
pub(crate) mod ui;