Build apps for DurgX
How an app fits in and how it talks to the kernel.
Preview interface
The app developer kit (SDK) is not public yet. The snippets here show the shape of the interface described in the v0.1 specification. Names, numbers and signatures can change before release. For early access, write to [email protected].
What an app is
An app is a task: a limited (Ring 3) program with its own private memory and its own table of capabilities. It starts with only the capabilities its parent gave it. It cannot touch hardware, other programs or kernel memory unless a capability allows it.
The three ways an app communicates
| You want to | Use | Read |
|---|---|---|
| Ask the kernel to do something (map memory, use a capability, give up the CPU) | System calls | Talking to the kernel |
| Send a short request to another program | Quick messages (call and reply) | How programs talk |
| Stream lots of data to another program | Shared rings | Sending data with rings |
What you need
- Rust (nightly) with the bare-metal target
x86_64-unknown-none. - The
libipccrate, which holds the ring layouts shared with the kernel. It is part of the SDK. - A DurgX ISO or virtual machine to run it on.
A map of this section
- Your first app: a minimal program that builds and runs.
- Talking to the kernel: the system call interface.
- Sending data with rings: fast zero-copy data.
- Writing a driver: hardware access and crash recovery.
Note
Existing Linux programs are a separate story. See Linux apps.