Expand description
The runtime crate. Holds the world loop, the ECS, the GraphicsSystem renderer
driver, audio, and physics. The GPU-free render-prep lives in
concinnity-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/render/device (no concinnity-cook, no image
decoders). The editor crate (concinnity-editor) drives this crate’s App /
renderer through the public API widened here; the modules the editor reaches
into are pub so it can name their paths, but individual internals stay
pub(crate) unless the editor specifically needs them.
Re-exports§
pub use app::run::BlobSource;pub use app::run::run_from;pub use app::run::PipelineMode;pub use app::run::RunOptions;pub use app::run::init_logging;pub use app::state::App;pub use components::*;
Modules§
- app
- Client application runtime: the world loop and the runtime systems that drive
a compiled world. The build / edit / debug / preview paths live in the
editor crate.
pubso the editor crate (which drives a live App via the runtime API) can reach these runtime app items throughconcinnity_engine::app::*. - blob
- Blob file reading and lazy payload residency live in
concinnity_host::store; re-export them under the historical crate::blob::* paths.pubso the editor crate’s in-memory build path can constructBlobData. - components
- Client-side component surface: a thin re-export of concinnity-core’s
component types under the historical
crate::components::*paths. All components are pure data now: every system became an internal client system living in its own domain module (gfx::graphics_system,gfx::camera_controller,gfx::animation,ui,hud,physics) or audio module (crate::audio), constructed byWorld::startfrom the components a world declares. - crash
- Crash reporting: panic hook, native fault capture, local report files.
pubso the binaries install the hooks and the editor composes the recent-log ring layer into its tracing subscriber. - ecs
- Client-side ecs runtime. The renderer-free metadata, asset registry,
registration macros, asset-construction API,
PipelineContext, theSystembehavior trait, and theWorldthat runs systems over its data all live in concinnity-core; this module re-exports them under the historicalcrate::ecs::*paths and adds what only a renderer-bearing runtime has: the system table itself, its gates, the load-time decomposition pass, and the resources the render band parks in a world. - gfx
- The client’s render layer. The backend-agnostic render-prep helpers (record
builders, render graph, trait seam, CPU-side render math, plus the GPU-free
cursor / sprite / text / lights / streaming layout helpers) now live in
concinnity-render and are re-exported below under the historical
crate::gfx::<module>paths so the rest of the client and the device backends keep resolving. What remains declared here are the game/runtime render systems (the renderer driver, animation, camera controllers, draw list) and the client-only settings/quality-preset resolution. - jobs
- Backend-agnostic job pool for parallelising expensive per-frame CPU work.
- paths
- Project state root: where the engine’s state tree is anchored, and the names of the directories hanging off it.
- resource
- Runtime resource tables (per-kind, handle-indexed views of the blob’s resource
stream).
pubso the editor’s in-memory build path can construct the tables it inserts into the world, mirroring the shipped-runtime loader. - shutdown
- Cooperative shutdown signal shared across threads. Clones observe the same
flag: any clone’s
cancel()is visible to every other clone’sis_cancelled(). Cancellation is one-way and sticky.
Macros§
- define_
systems - The system table. Generates the
SYSTEMStable a world starts from; table order is run order.
Structs§
- Shader
Precompile Report - Outcome of a built-in shader precompile: how many artifacts were already in place or copied from the local cache, how many compiled fresh, and the programs that failed (with their compile diagnostics). Failures do not abort the run – the affected shader falls back to compiling at the bundle’s first launch.
Functions§
- precompile_
builtin_ shaders - Compile every enumerable built-in shader variant into
out_dir(a bundle’sshader-cache/).texture_countis the exported world’s texture-table length, which sizes the Vulkan bindless texture pool baked into its pool-sized shaders; DirectX ignores it (its pools are unbounded arrays). - set_
writable_ state_ dir - Anchor the runtime-writable state (
saves/+settings) atdir, leaving the read-only content (data/) at the installed state dir. A shipped application installs this when its content dir is not writable (a read-only install such as Program Files), redirecting only what it writes at runtime to a per-user directory. When unset, writable state stays besidedata/.