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.
11 lines
220 B
Ziran
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
|
|
}
|