std/app
Import with import std/app.
Exports
Section titled “Exports”Interfaces
interface App
Section titled “interface App”interface App { field context: Context }
The contract every active app struct must satisfy. Programs stage the
struct returned by app-entry boot(); tests stage the struct returned by a
boot block inside a tests container. Either staged value must carry a
per-life Context so active app reads like MyApp.context resolve and
derived contexts (with MyApp.context = Context.with_timeout(MyApp.context, ...))
have a parent.
Project code lists App in its concrete app struct’s impl block;
the analyzer validates the struct has a context: Context field. Any other
fields the project wants (configuration, dependency handlers, state) sit
alongside context — App only enforces the one mandatory field.
Programs without a user-defined boot get runtime metadata with just
context: Context populated from Context.root().