ymawky is a static HTTP server written entirely in aarch64 assembly for macOS, using raw Darwin syscalls with no libc and no external libraries.
Key Takeaways
Supports GET, HEAD, PUT, OPTIONS, DELETE, byte ranges, directory listing, and custom error pages with hardening attempts.
Uses fork-on-request model; each connection spawns a child process, simpler to reason about but worse under high concurrency than event-driven models like nginx.
PUT writes to a temp file named .ymawky_tmp_<pid> first, then atomically renames on success or unlinks on failure, avoiding partial writes.
HTTP parsing is fully hand-rolled: percent-decoding, Range header parsing, custom atoi with overflow checks, and strict CRLF validation, all in assembly.
Path extraction alone is roughly 200 lines of assembly vs. a one-liner in Python, illustrating the raw cost of zero abstraction.