You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On September 5, 2025, Wave successfully achieved its first UDP network communication.
This post documents that milestone.
Although Wave is still in a pre-beta stage and currently runs only on Linux x86-64,
this experiment proves that Wave can directly interact with the operating system to perform network I/O.
udp.mp4
recvfrom in C
Normally, in C, receiving UDP packets looks like this:
So recvfrom() is not magic — it’s just calling system call number 45.
C vs Wave: Call Flow
C Call Flow
sequenceDiagram
participant C as C Code
participant L as glibc Library
participant K as Linux Kernel
participant N as Network Stack
C->>L: recvfrom call
L->>K: "syscall SYS_recvfrom"
K->>N: forward packet
N-->>K: data
K-->>L: result (n bytes)
L-->>C: result (n bytes)
Loading
Wave Call Flow
sequenceDiagram
participant W as Wave Code + inline asm
participant K as Linux Kernel
participant N as Network Stack
W->>K: "mov rax=45"
K->>N: forward packet
N-->>K: data
K-->>W: result (n bytes)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
#Wave Blog Link
On September 5, 2025, Wave successfully achieved its first UDP network communication.
This post documents that milestone.
Although Wave is still in a pre-beta stage and currently runs only on Linux x86-64,
this experiment proves that Wave can directly interact with the operating system to perform network I/O.
udp.mp4
recvfromin CNormally, in C, receiving UDP packets looks like this:
This is a familiar libc function.
But internally, it’s just a thin wrapper that calls the Linux kernel’s syscall.
Inside glibc, the implementation is essentially:
So
recvfrom()is not magic — it’s just calling system call number 45.C vs Wave: Call Flow
C Call Flow
sequenceDiagram participant C as C Code participant L as glibc Library participant K as Linux Kernel participant N as Network Stack C->>L: recvfrom call L->>K: "syscall SYS_recvfrom" K->>N: forward packet N-->>K: data K-->>L: result (n bytes) L-->>C: result (n bytes)Wave Call Flow
sequenceDiagram participant W as Wave Code + inline asm participant K as Linux Kernel participant N as Network Stack W->>K: "mov rax=45" K->>N: forward packet N-->>K: data K-->>W: result (n bytes)👉 The only difference:
C goes through glibc wrapper
Wave talks to the kernel directly
Final Wave Code
How It Works
Socket Creation
Calls
SYS_SOCKET (41)with parameters(AF_INET, SOCK_DGRAM)to create a UDP socket.Binding
Calls
SYS_BIND (49)to bind the socket to port 8080.The
addrarray represents a rawsockaddr_instructure.Receiving Data
Calls
SYS_RECVFROM (45)with correct register mapping:rdi = sockfd
rsi = buffer pointer
rdx = buffer length
r10 = flags (0, blocking mode)
r8 = src_addr pointer
r9 = addrlen pointer
Writing Output
Calls
SYS_WRITE (1)to print the received data directly to stdout.Running the Program
Run Wave program:
In another terminal, send a UDP packet:
Output:
Significance
This experiment shows that Wave can now:
Directly call Linux system calls
Implement UDP networking without libc
Receive real packets and interact with the OS network stack
Even though Wave is still pre-beta with no standard library,
we have demonstrated that it can already act as a system programming language.
Future extensions will include:
sendto()for UDP sendingconnect()/accept()for TCPHTTP library built in Wave
Asynchronous I/O for high-performance servers
Beta Was this translation helpful? Give feedback.
All reactions