Libertaria Wire Frame Protocol
24/24 Test Suites Passing
The Libertaria Wire Frame (LWF) protocol is the wire format used by the Libertaria protocol stack — a separate project that converges with Nexus OS at the networking layer.
Overview
LWF provides a structured frame format for Libertaria's decentralized communication protocols. It operates alongside UTCP and TCP/IP on the same network:
| EtherType | Protocol | Purpose |
|---|---|---|
0x0800 | IPv4 | Legacy TCP/IP (LwIP) |
0x88B5 | UTCP | Nexus sovereign transport |
0x4C57 | LWF | Libertaria protocol stack |
Integration with Rumpk
LWF is integrated into Rumpk through:
- Kernel dispatch: The NetSwitch routes frames with EtherType
0x4C57to the LWF handler fiber - Syscalls:
SYS_LWF_RECV(0x700) andSYS_LWF_SEND(0x701) provide kernel-mediated ION copy for LWF frames - CSpace: LWF_RX (
0x600, READ) and LWF_TX (0x601, WRITE) capabilities - Pledge: LWF operations require the
PLEDGE_INETbit
LWF Adapter
The lwf_adapter.zig module provides a freestanding LWF parser that runs in the kernel's address space:
- Parses LWF frame headers
- Validates frame checksums
- Routes frames to the correct ION Ring
- Zero-copy — frames are parsed in place, not copied
Capsule Integration
The Capsule NPL (the Libertaria stack's Nexus-native process) uses LWF for all its network communication:
- Capsule receives LWF frames via
SYS_LWF_RECV - Parses the LWF payload (protocol-specific messages)
- Sends responses via
SYS_LWF_SEND - Runs an event loop with heartbeat: recv → parse → echo → yield
The Capsule has been verified stable for 30+ seconds of continuous operation with zero faults.
Implementation
The Libertaria stack is implemented in ~15,000 lines of Zig across 24 test suites. It is maintained as a separate project and converges with Nexus OS when the Capsule runs as an NPL payload inside Rumpk.