; boot sequence initiated
mov rax, SYS_SOCKET
mov rdi, AF_INET
mov rsi, SOCK_STREAM
syscall ; no frameworks were harmed
>> server listening on :8080
The Web Framework That Refuses to Abstract
0 dependencies. 0 runtime. 0 compromise. Just syscalls.
// Why would you do this?
Everything you never knew you needed from a web framework, implemented at the lowest possible level of abstraction.
Why use Express when you can manually pack sockaddr_in structs? Every HTTP response is hand-crafted with MOV instructions.
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.
*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
Your entire web server fits in an L1 cache line. Meanwhile, node_modules just downloaded the entire npm registry for a hello world.
Process isolation via fork(). Each request gets its own address space. It is 1995 and that is a feature, not a bug.
Because even assembly deserves infrastructure-as-code. Deployed to AWS ECS via SST, because we are civilized barbarians.
// The actual code
The entire HTTP server. No hidden abstractions. No imported modules. Just you, the kernel, and a dream.
; 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
Completely real and not at all cherry-picked comparisons.
*benchmarks performed on the authors laptop at 3am
// Ship it
$
git clone https://github.com/brentrager/Verbosel
cd Verbosel
npx sst deploy --stage production
>> deployed to asm.rager.tech