๐ซ๏ธ Sane C++ November 26
Welcome to the November 2026 update! Sane C++ Libraries adds experimental support for NetBSD, FreeBSD, and OpenBSD. This month also brings clearer filesystem watcher notifications, more Async fixes, and full Debug test coverage on Windows ARM64.
Experimental BSD support
The biggest change this month is experimental support for NetBSD 11, FreeBSD 15.1, and OpenBSD 8.0 on amd64 and ARM64. It landed in a single squashed commit on November 28, but I started bringing up NetBSD at the beginning of the month. FreeBSD and OpenBSD followed as the libraries, build tools, and tests came together.
I periodically rebased the BSD branch onto development or main as the port progressed. Most of the FileSystemWatcher, Async, and networking fixes below started on that branch. I cherry-picked them back as they were ready, so those fixes reached the main development line before the port itself landed.
The three systems share a lot of POSIX code, but the differences show up quickly in real programs. Async uses kqueue for event delivery on all three. For file sends, FreeBSD can use its native sendfile, while NetBSD and OpenBSD use buffered I/O. Fibers supports protected stacks and incremental stack growth, and plugins can be built natively and reloaded in response to filesystem notifications.
The BSD workflow runs the shared Debug and Release suite, building natively in amd64 guests and cross-compiling on Linux before running in ARM64 guests. It also checks the generated single-file libraries. Runtime features still depend on what is installed: for example, HttpClient loads libcurl, and AES and HMAC use the optional OpenSSL 3 provider.
BSD is an experimental support tier alongside the primary macOS, Windows, and Linux targets. The support matrix lists the releases and capabilities exercised so far. BSD support matrix ยท Port commit
FileSystemWatcher
Recursive watching is a good example of where the BSDs differ. FreeBSD shares the Linux inotify backend. On NetBSD and OpenBSD, the kqueue backend keeps a bounded inventory of open directories and regular files and reconciles it when the tree changes. Both approaches support threaded and event-loop delivery.
The watcher also gives applications clearer signals when coverage changes. RescanRequired asks the caller to reconcile the tree, CoverageLimited says monitoring is still running with a known limitation, and WatchStopped tells the caller that monitoring has ended. A hot-reload loop can then decide whether to rescan, restart a watch, or just process an ordinary change. The work includes handling Linux queue overflow, macOS stream refresh gaps, and Windows completion loss, with shared tests for the async watcher. FileSystemWatcher ยท Portable watcher contract ยท Shared regressions
Async and networking
One Async fix started with a truncated HTTP response. A regression test forced an io_uring socket write to complete only 1,287 of 2,730 bytes. Async now submits the unsent suffix before calling the completion callback, and the same test receives the entire response. Short io_uring writes
Immediate POSIX connection refusals now go through normal callback dispatch. On Windows, Async rechecks timer deadlines after polling and drains external completion packets before their storage can be reused. Separately, Http enables TCP_NODELAY on its built-in listener to avoid delays when headers and a small body are written separately. Async ยท POSIX connect ยท Windows timers ยท Windows completions ยท Small HTTP responses
Windows ARM64 and CI
The build tools now support Visual Studio 2026 Build Tools, and Windows ARM64 runs the full Debug SCTest suite in CI. Fibers also supports caller-owned stacks on Windows ARM64 by restoring the stack bounds that Windows expects when switching contexts. Visual Studio 2026 ยท Windows ARM64 tests ยท ARM64 fiber stacks
On BSD, ARM64 cross-compilation overlaps with guest startup for FreeBSD and NetBSD. OpenBSD guest tests run serially, with generated-library builds on a separate Linux runner. The macOS workflow now needs two runner jobs instead of five, keeping the Release build fixtures alongside the shorter Debug suite. Fil-C retries can reuse compatible object bundles from earlier attempts or build locally when the bundle is unavailable. BSD ARM64 CI ยท macOS CI ยท Fil-C retries
See you next month!