Skip to main content

uzor_framework/host/
mod.rs

1//! ROLE host/* (shell): the loops that drive the runtime (design §9).
2//! Hosts own the OS event loop, the paint surface and the clock; they see
3//! the [`Runtime`](crate::Runtime) only (ban F10). The headless host is
4//! the deterministic test host: it compiles without features, runs every
5//! §9.2 script, and paints into a recording context.
6//!
7//! The native (winit) host lives behind feature `native` ([`native`]); the
8//! web host lives behind feature `web` ([`web`]).
9
10mod headless;
11
12pub use headless::HeadlessHost;
13#[cfg(all(feature = "automation", not(target_arch = "wasm32")))]
14pub use headless::run_headless;
15
16#[cfg(feature = "native-core")]
17pub mod native;
18
19#[cfg(feature = "native-core")]
20pub use native::{
21    run_native, run_native_default, NativeOptions, RenderPreference, TraySpec, WinitMapper,
22};
23
24#[cfg(feature = "web")]
25pub mod web;
26
27#[cfg(feature = "web")]
28pub use web::{run_web, run_web_with, start_web, WebOptions};
29#[cfg(all(feature = "web", feature = "dev-control"))]
30pub use web::{dev_requested, WebDevControl};
31
32#[cfg(test)]
33mod tests;