playbit / docs / runtime

Playbit Runtime

#include <playbit/sys/sys.h> defines the runtime interface used by guest programs.

The Playbit runtime is capability-based:

Read more in "Capabilities"

Startup and execution

Main-thread startup is:

  1. Guest calls PBSysThreadEnterMain(flags).
  2. Native guest calls PBSysNativeMain(entry, arg1, arg2, configurator).
  3. Host runtime invokes guest pb_thread(...) on each runtime thread.
  4. Guest code performs syscalls (pb_syscall, pb_syscall_async) and polls events (PBSysEventPoll).

See ABI for exact call boundaries.

Event delivery

There is no host-to-guest callback pair in the current API. Guests pull events using PBSysEventPoll into a variable-size event buffer.

See System events.

Runtime reference

You can also read the entire combined Playbit API reference on a single page