Async-a-sync is a compiler and runtime framework that lets C programmers write ordinary, blocking-looking code while annotated function calls execute asynchronously. Built on Fil-C, it marks calls for a chosen runtime; those calls return immediately and leave their output buffers pending. The key idea is that waiting happens implicitly: Fil-C pointer metadata lets the patched compiler detect a pending buffer when code first accesses it, then wait at that point. This removes explicit submit-and-wait operations from common use. For operations that depend on several earlier results, `filc_async_wait_all` can join completion tags so a later call waits for the whole group.
The repository includes an io_uring runtime that batches queued file operations for submission when a result is first needed, and an RPC runtime that sends calls to a TCP server. Its example queues reads for 512 files, then processes each buffer; the project reports that cold-cache reads finish about 3.5 times faster than blocking `pread`. A separate demo queues 30 reads and makes one write depend on all of them. The codebase provides a patched Fil-C compiler, runtime framework, demos, tests, and documentation covering annotations, runtime development, linking, architecture, and limitations. Setup targets Linux x86-64 with io_uring; Docker may need an unrestricted seccomp profile, and Rosetta does not support io_uring.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.