I’ve worked on a handful of projects over the past years. As SourceHut and GitHub’s project discovery mechanisms are poor, I’ve decided to list them here, in order of relative importance.
smol is a small and fast
async runtime for Rust.
It is designed to be easily compartmentalized, efficient and simple. A user with intermediate Rust programming experience should be able to understand the components of the runtime and how they interact with each other.
async-iois a reactor for asynchronous I/O primitives. It wraps around socket types (like
UnixStream) and provides a unified interface for asynchronous I/O. It uses
pollingto poll for I/O events and converts them into a futures-based API.
blockingis a thread-pool that can transform blocking functions into asynchronous functions. This thread pool is flexible and only uses the number of threads that are needed. It can also turn
Iteratortypes into asynchronous
Streamthat uses this thread pool.
futures-liteis a lightweight set of combinators for futures,
Streams and asynchronous I/O.
async-taskprovides a way to associate some state with a future such that it can be polled in a separate executor, while a
Taskhandle is still held by the user. It is highly efficient, only uses a single allocation and has zero dependencies.
async-executoris the reference implementation of the
asynchronous executor built on
async-task. It supports multi-threaded execution, and is used by
smolto execute tasks.
async-channelis an MPMC asynchronous channel that supports sending data between tasks.
async-lockis an implementation of locking primitives that can be
std::fs. It uses
blockingto handle file system operations in an
asyncimplementation of the
std::netmodule. It provides
UnixStreamtypes. It uses
async-iofor asynchronous I/O and
blockingfor DNS lookups.
std::process. It listens for SIGCHLD in order to wait for inner process events in an
async-iois used for asynchronous I/O on pipes in Unix, and
blockingis used on Windows.
async-signalallows for asynchronous signal waiting. It is used in
async-processto wait for the SIGCHLD signal.
concurrent-queueis a lock-free MPMC queue. It is used to implement channels, task queues and other primitives.
event-listeneris a fundamental building block for asynchronous primitives. Essentially, it allows non-blocking data structures to be transformed into asynchronous data structures, by having it wait for events to happen in other tasks. Under the hood it is a linked list of tasks waiting for an event to happen.
fastrandis a basic PRNG that provides good-enough randomness for many applications in
parkingblocks and unblocks threads. It is a version of
std::thread::parkwithout global variables and with a “signal” mechanism.
piperis a ring buffer that can send bytes between tasks. It is used to implement pipes in
pollingis a portable but featureful around
kqueue, IOCP and others. It allows for cross-platform polling of I/O events.