HeadlinesBriefing favicon HeadlinesBriefing.com

Assembly‑Based Web Server ymawky Hits Apple Silicon

Hacker News •
×

ymawky is a lightweight static‑file web server written entirely in ARM64 assembly for macOS. The project, built with Xcode command‑line tools, runs only on Apple Silicon and serves GET, PUT, DELETE, HEAD, and OPTIONS requests. Its docroot defaults to a www/ folder beside the binary, and it can handle video scrubbing via Range headers today.

Under the hood, ymawky is a syscall‑only, fork‑per‑connection server that avoids libc entirely. It enforces strict path checks, rejecting paths longer than 4096 bytes, any attempt at traversal, or requests that exceed a 16‑byte prefix. The server also caps upload size at 1GiB and writes data to a temp file before renaming it atomically now.

The server supports a full range of HTTP status codes, including 200, 404, 413, and 507, and serves custom error pages from an err/ directory. PUT requests are atomic; GET requests honor Range: bytes=X‑Y, enabling efficient video streaming. Security mitigations include a 10‑second timeout for header reception and a 10‑second overall data window within this.

Running the binary starts the server on 127.0.0.1:8080 by default; a custom port can be supplied as an argument. Debug mode disables forking and processes one request at a time, useful for lldb debugging. Despite its minimalist design, ymawky demonstrates how assembly can still deliver production‑ready HTTP services for developers everywhere and engineers today here.