server.asm - Verbosel

; boot sequence initiated

mov rax, SYS_SOCKET

mov rdi, AF_INET

mov rsi, SOCK_STREAM

syscall ; no frameworks were harmed

>> server listening on :8080

Verbosel

The Web Framework That Refuses to Abstract

0 dependencies. 0 runtime. 0 compromise. Just syscalls.

0
Dependencies
~12KB
Binary Size
10
Syscalls Used
0ms
Cold Start

// Why would you do this?

Features

Everything you never knew you needed from a web framework, implemented at the lowest possible level of abstraction.

Zero Abstraction

Why use Express when you can manually pack sockaddr_in structs? Every HTTP response is hand-crafted with MOV instructions.

Blazingly Fast

No garbage collector. No JIT warmup. No event loop. Your CPU executes exactly what you wrote. It boots before your Node.js app finishes parsing package.json.

🔒

Memory Safe*

*As safe as the programmer writing it. Which is to say: not at all. But at least you can SEE every byte being touched.

*not actually memory safe

📦

12KB Binary

Your entire web server fits in an L1 cache line. Meanwhile, node_modules just downloaded the entire npm registry for a hello world.

🔥

Fork-Per-Request

Process isolation via fork(). Each request gets its own address space. It is 1995 and that is a feature, not a bug.

🚀

SST v4 Deployed

Because even assembly deserves infrastructure-as-code. Deployed to AWS ECS via SST, because we are civilized barbarians.

// The actual code

Source

The entire HTTP server. No hidden abstractions. No imported modules. Just you, the kernel, and a dream.

server.asm (the important bits)
; Create TCP socket
mov     rax, 41          ; SYS_SOCKET
mov     rdi, 2           ; AF_INET
mov     rsi, 1           ; SOCK_STREAM
xor     rdx, rdx
syscall

; Bind to 0.0.0.0:8080
mov     rax, 49          ; SYS_BIND
mov     rdi, r12         ; socket fd
lea     rsi, [rel sockaddr]
mov     rdx, 16
syscall

; Listen with backlog 128
mov     rax, 50          ; SYS_LISTEN
mov     rdi, r12
mov     rsi, 128
syscall

accept_loop:
    mov rax, 43      ; SYS_ACCEPT
    mov rdi, r12
    xor rsi, rsi
    xor rdx, rdx
    syscall          ; blocks until connection
    mov r13, rax     ; save client fd

    ; Fork to handle request
    mov rax, 57      ; SYS_FORK
    syscall
    test rax, rax
    jz  handle_request
    jmp accept_loop ; parent continues listening

// Numbers dont lie

Benchmarks*

Completely real and not at all cherry-picked comparisons.

*benchmarks performed on the authors laptop at 3am

Verbosel~0.001ms
Go net/http~0.05ms
Rust Actix~0.08ms
Node.js Express~2.5ms
Next.js (cold start)~150ms

// Ship it

Deploy in 3 Instructions

$

git clone https://github.com/brentrager/Verbosel

cd Verbosel

npx sst deploy --stage production

>> deployed to asm.rager.tech