Expand description
A code-first application and logic layer for Sim;Engine.
Sim;Logic owns the ordinary application loop around an ECS world: staged systems, bounded structural spawn/insert/remove/despawn commands, typed input, fixed-step time, application-owned resources, World replacement, application-requested exit, and extraction into Sim;Engine scenes.
§Where to start
Use prelude for application setup, then app::Application to register
World factories and Systems. headless::HeadlessRunner advances the same
runtime without a window or GPU. See the usage guides
for a complete headless program and desktop examples.
§Optional features
desktop(default): window hosting and the Sim;Engine GPU bridge.fonts: CPU font loading, shaping and rasterization through Engine.headless-text: managed CPU text preparation, includingfonts.text: retained GPU text, includingheadless-textbut not window hosting.audio: single-source device output through Rodio.easter-eggs: the bundled Ferris image helper.
Disable default features for the core headless runtime. Systems execute sequentially; only one World is active. Domain models, gameplay, layout and collision response remain application code, not renderer state.
Re-exports§
pub use easter_eggs::CrabDrawError;pub use easter_eggs::draw_crab;pub use bevy_ecs;
Modules§
- app
- Application configuration and immutable registry construction.
- assets
- Immutable CPU assets owned by an application across World replacement.
- audio
- Optional application-owned output for one streaming mono PCM source.
- collision
- Basic collision shapes and live overlap queries.
- commands
- Bounded managed structural, World-transition, and application-control commands.
- desktop
- One-window desktop adapter for the shared Sim;Logic frame driver.
- easter_
eggs - Optional Ferris mascot; ordinary managed images do all the actual drawing.
- events
- Count-bounded typed events visible only within one System-stage invocation.
- fonts
- Engine’s CPU-only font loading, shaping and reusable layout primitives.
Enable
fontswithout default features to use these without a GPU or window. - headless
- Renderer-independent application runner and its public frame diagnostics.
- identity
- Opaque runtime identities.
- input
- Typed, platform-independent keyboard and pointer input.
- motion
- Opt-in fixed-step motion components and systems.
- prelude
- Commonly used Sim;Logic and ECS types.
- query
- Generation-checked component queries for managed Systems.
- render
- Renderer-independent limits for visual extraction and presentation.
- resources
- Application-owned typed state that survives World replacement.
- screen
- Managed presentation geometry in logical screen pixels.
- system
- Sequential, per-World System construction and execution.
- text
- Optional single-line screen labels using Sim;Engine’s font implementation.
- three_d
- Opt-in, bounded cuboids and host-built surface meshes.
- time
- Validated frame and fixed-step timekeeping.
- transition
- No-payload World replacement helpers and deterministic arbitration.
- ui
- Explicit, headless interaction helpers for application-owned UI.
- visual
- Standard visual components for the first Sim;Logic slice.
- window
- Optional window commands, independent of windowing and rendering crates.
- world
- Isolated managed World construction.
Structs§
- Extracted
Frame - Complete renderer-independent visual snapshot for one World generation.
- Layer
- Draw layer used to order scene commands.
- Resolved
Circle - One fully resolved circle retained for headless parity and diagnostics.
- Resolved
Line - One fully resolved anchored line retained for headless parity and diagnostics.
- Resolved
Rectangle - One fully resolved rectangle retained for headless parity and diagnostics.
- Resolved
Screen Image - One immutable screen-image description in a published CPU snapshot.
- Resolved
Screen Rectangle - One screen-fixed rectangle retained for headless inspection.
- Resolved
Screen Text - One prepared screen label retained by a complete CPU snapshot.
- Scene
Budget - Explicit upper bounds for engine-owned ordinary-scene work.
- Screen
Extraction Updates - CPU screen extraction work, not tessellation, upload or GPU timing.
- Stroke
- Stroke color and width for lines and shape outlines.
- Stroke
Dash Pattern2d - Fixed-size, allocation-free dash pattern in source path-coordinate units.
- Stroke
Marker2d - Reusable arrow marker definition for a line endpoint.
- Stroke
Style2d - Complete bounded styling for open 2D lines and polylines.
Enums§
- Component
Approval Error - A component or bundle cannot enter the frozen managed component set.
- Extraction
Error - Structured reason why a new CPU visual snapshot was not published.
- Lifecycle
Hook - A Bevy lifecycle hook excluded from managed first-slice components.
- Resolved
Screen Primitive - One sampled screen primitive. Images and labels remain separate retained sources.
- Scene
Budget Resource - Work category constrained by a
SceneBudget. - Scene
Error - Reason a command or temporary scene state was rejected.
- Screen
Draw - One ordered screen source, after all world content.
- Stroke
Cap2d - Presentation used at an open line or dash endpoint.
- Stroke
Join2d - Presentation used where two visible polyline segments meet.
- Stroke
Marker Anchor2d - Placement of a logical-pixel arrow relative to its mathematical path endpoint.
- Stroke
Style Error - Invalid bounded line-style configuration.
- Stroke
Width Mode2d - Coordinate space used by a line or polyline stroke width.
Traits§
- Component
Tuple - A flat tuple of component types approved together before application start.
Type Aliases§
- Logic
Result - Convenience result for application code and fallible Systems that combine
unrelated owned error types with
?.