Skip to content
Tech News
← Back to articles

Show HN: Building a web server in assembly to give my life (a lack of) meaning

read original get Assembly Language Programming Kit → more articles
Why This Matters

This project demonstrates the extreme of low-level programming by building a web server entirely in ARM64 assembly without relying on standard libraries. While primarily a technical curiosity, it highlights the potential for highly optimized, minimalistic server implementations and pushes the boundaries of what can be achieved with assembly language in modern web infrastructure.

Key Takeaways

ymawky -- web server in ARM assembly

This is ymawky (yuh maw kee), a web server written entirely in ARM64 assembly. ymawky is a syscall-only, no libc, fork-per-connection web server written by hand. While it is developed for MacOS, I've tried to make it as portable as possible -- however, it's likely you will still need to make some (hopefully minor) Significant tweaks to get this to run on Linux/other Unix systems. See Implementation Notes for more details.

Building

Requires Xcode Command Line Tools. Install with xcode-select --install . ymawky only runs on apple silicon (arm64).

Run make to build.

Ensure there is a www/ directory next to the ymawky executable. That's the document root where ymawky searches for files. GET with an empty filename ( GET / ) will search for www/index.html , so you might want to make sure there's an index.html as well.

ymawky will try to serve static error pages when a client's request results in error, eg 404. The pages it searches for in err/(code).html , so ensure err/ exists alongisde ymawky and www/ . See Configuration to modify the default file and docroot.

Running

./ymawky to start running the web server on 127.0.0.1:8080 .

to start running the web server on . ./ymawky [port] to start running the web server on 127.0.0.1:[port]

... continue reading