How s-ajensen/cask works
Cask is a modular Rust engine for running plugin-based interactive applications, including the museum example documented in the README. Its principal workflow is to discover and load plugins, initialize a shared world, and run their systems on a fixed-tick engine loop until shutdown. Foundation crates cover world simulation, content and rendering; tracing can be written to a file or streamed to the separate collector. The runner and engine flow are supported by sampled source; several foundation capabilities are represented from the tree and crate names, whose internal wiring was not sampled.
Main entry points: src/main.rs Application runner · engine.rs Tick engine · registry.rs Plugin registry · src/main.rs Trace collector
Components 24
Runtime
- Application runner
crates/engine/cask-run/src/main.rs - Plugin registry
crates/engine/cask-engine/src/registry.rs - Plugin systems
crates/engine/cask-engine/src/plugin_system.rs - Tick engine
crates/engine/cask-engine/src/engine.rs - Shared world
crates/engine/cask-engine/src/world.rs
World simulation
- Entity components
crates/foundation/cask-ecs/src/lib.rs - Behavior runtime
crates/foundation/cask-behavior/src/driver.rs - Event channels
crates/foundation/cask-events/src/event_channel.rs - Input handling
crates/foundation/cask-input/src/lib.rs - Transforms
crates/foundation/cask-transform - Physics simulation
crates/foundation/cask-physics/src/simulation.rs - Animation
crates/foundation/cask-animation/src/lib.rs
Content and assets
- Resource loading
crates/foundation/cask-resource/src/lib.rs - glTF import
crates/foundation/cask-gltf/src/lib.rs - OBJ import
crates/foundation/cask-obj/src/lib.rs - Scene assembly
crates/foundation/cask-assembly/src/lib.rs
Rendering
- Scene data
crates/foundation/cask-scenery/src/lib.rs - GPU renderer
crates/foundation/cask-renderer/src/renderer.rs
Profiling
- Trace recording
crates/engine/cask-trace/src/trace.rs - Trace collector
crates/engine/cask-collect/src/main.rs - Collected traces
crates/engine/cask-collect/src/collection.rs - Trace file
Other components
- Application operator
- TCP collector
Connections 13
- Application operator → Application runner: starts run
- Application runner → Plugin registry: loads plugins
- Application runner → Plugin registry: initializes world
- Plugin registry → Plugin systems: provides systems
- Application runner → Tick engine: runs loop
- Tick engine → Plugin systems: ticks systems
- Application runner → Shared world: creates world
- Application runner → Trace recording: opens profile
- Tick engine → Trace recording: records spans
- Application runner → Trace file: writes profile
- Application runner → TCP collector: streams profile
- TCP collector → Trace collector: accepts stream
- Trace collector → Collected traces: collects events