See authority move through an application.

These examples show complete host-and-worker programs, not isolated API fragments. Each one states the resources a component receives, the operations the host mediates, and the result that the test verifies.

Start with the image decoder, then explore dynamic network mediation, minimal pipe capabilities, and ordinary subprocess orchestration.

Sandboxed image decoder

Native parsing without general file access. A Qt decoder runs in a separate Easybox process. The host supplies one read-only file and accepts a validated framebuffer in return.

Qt Quick UINative image parserPositive and negative tests

Read the flagship case study

Dynamic network policy

Policy follows application intent. A supervisor permits resolution of localhost and a connection to the resulting loopback address and selected port. A request for example.com:80 is rejected.

libc_serviceReal loopback serverAllowed and denied outcomes

Trace the request and policy checks

Least-authority pipe plugin

Two capabilities are enough. A plugin lowercases text received on one pipe and writes the result to another. Its Lua source is explicitly packaged without giving it the host filesystem.

EasyboxDescriptor passingConcurrent host write

Follow the complete exchange

GPG subprocess orchestration

Processes and fibers share one program. GPG encrypts and decrypts an in-memory message through pipes. The host uses concurrent fibers for streaming and asserts the round-trip result.

system.spawn()Process waitingFiber joining

Read the process example

Build once, verify every example

The source tree pins the Emilua tools with mise. Run mise run verify for all noninteractive examples and the image decoder’s positive and negative tests.

Open the build and verification guide.

Historical origin

The approach was previously demonstrated in the July 2025 talk Emilua Demo: Actor Model and Sandboxes. The programs on this site are newly written and independently verified rather than copies presented as current without testing.