Files
kryon/tests/hosted_app_loop.zi
T
waozi fe37943f21 Run a bundle inside a host application with hosted_app
Applications that run another .zib in their window each opened the
bundle, checked its capabilities, bound them, limited its steps and kept a
working instance through restarts. hosted_app does that once:
HostedAppStart asks the host about every capability and binds them to one
HostCall with field names matched, HostedAppRun runs under a step limit and
marks a trap as failed, HostedAppRestart closes the old instance only once
the new one passes the host's handshake, and HostedAppAsset finds a packed
asset by its exact path.
2026-10-11 00:23:19 -03:00

11 lines
220 B
Ziran

// A bundle for the hosted_app test that never returns, so its run traps at
// the host's step limit.
#program_export
main :: () -> s32 {
count: s64 = 0
while count >= 0 {
count += 1
}
return 0
}