Skip to content

The net stack

▶️ Try it live in the Playground — write and run .nim / .aowl in your browser, no install.

A Nimony-native networking stack, one concern per repo, layered tcp → net → tls → serve with transport-free http/compress helpers and ws / requests alongside. Common stance throughout: nimony-native, no framework runtime, status-based errors instead of exceptions, blocking I/O by default with a non-blocking escape hatch on every handle. TLS 1.3, dual-stack IPv6, a concurrent worker pool, HTTP/2, WebSocket, and HTTP/3 (client) are all first-class — and a single-threaded async reactor (epoll + passive-proc coroutines) multiplexes async HTTP/1.1, an Autobahn-grade WebSocket, and an HTTP/3 (QUIC) server on one thread as an alternative to the worker pool.


How it layers

requests   (HTTP client — curl-impersonate; HTTP/2 + HTTP/3, browser-identical)

ws         (WebSocket, RFC 6455 — ws:// and wss://, server + client)

serve      (HTTP/1.1 + HTTP/2 server; HTTPS; concurrent pool; compression)  ┐
  ├── http (transport-free: headers, URL/form, parsing, status)             │
  ├── compress (gzip / brotli / zstd codecs)                                │  consumed
  ├── tls  (TLS 1.3 over OpenSSL 3 — client + server)   ┐                    │  by serve
  └── net  (Socket / dual-stack IPv6 / dial)           │ tls wraps a Socket  │
        └── tcp (native sockets: IPv4 + IPv6)          ┘                     ┘

http and compress are deliberately out of the transport chain — no sockets — so any transport can reuse them. tls sits beside net (it wraps a net.Socket), and serve / ws build on both.


Libraries

LibraryWhat it isRepo
tcpNative blocking sockets, IPv4 + IPv6, raw handlesaoughwl/tcp
netSocket ergonomics, dual-stack dial/listen6, buffered readsaoughwl/net
tlsTLS 1.3 over OpenSSL 3 — client + server, ALPNaoughwl/tls
httpTransport-free HTTP: headers, URL/form, parsing, statusaoughwl/http
compressgzip / brotli / zstd codecsaoughwl/compress
serveHTTP/1.1 + HTTP/2 server, HTTPS, concurrencyaoughwl/serve
wsWebSocket (RFC 6455), server + client, ws:// + wss://aoughwl/ws
requestsBrowser-identical HTTP client (curl-impersonate)aoughwl/requests

Each library page above is a self-contained API reference for that repo.

For where the stack is going — what "100% configurable on both sides" definitively means, every hardcoded value and unreachable knob we found in an audit of all eight repos, how that compares to Go / Rust / Node / Netty, and the phased order to close it — see the configurability roadmap.

aoughwl — self-hosted platform for things n stuff. Contact / Support on Discord for access to the private backends.