pub struct Engine {
pub model: AppModel,
/* private fields */
}Expand description
What one running yog is, minus its face. The model is public because a face renders it; the three threads are held only so they live as long as the engine and are stopped and joined when it drops (each owns that shape itself — §7.2).
Fields§
§model: AppModelImplementations§
Source§impl Engine
impl Engine
Sourcepub fn serve(ambient: &Env, overrides: &[(String, String)])
pub fn serve(ambient: &Env, overrides: &[(String, String)])
Run the engine until a §8.5 stop is asked for. Converge
the world’s tool shims (§8.4, bl-44a5 — the world PATH names that dir
unconditionally, so every face that hands the world out seeds it), catch
the signal before the engine exists so a stop during boot is not lost,
then park. Returns when the engine has stopped and joined every thread
it spawned; the caller’s only remaining act is to exit.
Source§impl Engine
impl Engine
Sourcepub fn park_until_stopped(self)
pub fn park_until_stopped(self)
The windowless face’s whole loop — park until a stop is asked for,
then drop the engine. Takes self by value so that returning from it
and stopping the engine are the same act: there is no way to park
without the drop, which is exactly the defect this closes.
Source§impl Engine
impl Engine
Sourcepub fn boot(
world: &Env,
overrides: &[(String, String)],
clock: Arc<dyn Clock>,
) -> Self
pub fn boot( world: &Env, overrides: &[(String, String)], clock: Arc<dyn Clock>, ) -> Self
Boot the engine into world (already composed, §16.2) with overrides
standing on every child spawn.
The §5.2 startup sweep runs here rather than at either caller: dropping
stale scratch is the engine’s housekeeping, and its wall clock is the
injected Clock every other timestamp already comes from — so a test
advances it like anything else. It is both of §5.2’s transient
artifacts off one clock read: the scripted-editor staging dirs, and
(bl-e47c) the I3 temps left in the destination directories yog writes
through — the half the doc had promised since I3 and nobody had written.