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
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.
I am not the original author of smol; however, I am one of its primary maintainers. smol is composed of many smaller crates.
async-iois a reactor for asynchronous I/O primitives. It wraps around socket types (likeTcpStreamandUnixStream) and provides a unified interface for asynchronous I/O. It usespollingto 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 turnRead,WriteandIteratortypes into asynchronousAsyncRead,AsyncWriteandStreamthat 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 aTaskhandle 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 theasynchronous executor built onasync-task. It supports multi-threaded execution, and is used bysmolto execute tasks.async-channelis an MPMC asynchronous channel that supports sending data between tasks.async-lockis an implementation of locking primitives that can beawaited on.async-fsis anasyncimplementation ofstd::fs. It usesblockingto handle file system operations in anasyncway.async-netis anasyncimplementation of thestd::netmodule. It providesTcpStream,TcpListener,UdpSocketandUnixStreamtypes. It usesasync-iofor asynchronous I/O andblockingfor DNS lookups.async-processis anasyncwrapper aroundstd::process. It listens for SIGCHLD in order to wait for inner process events in anasyncway.async-iois used for asynchronous I/O on pipes in Unix, andblockingis used on Windows.async-signalallows for asynchronous signal waiting. It is used inasync-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 insmol.parkingblocks and unblocks threads. It is a version ofstd::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 inblocking.pollingis a portable but featureful aroundepoll,kqueue, IOCP and others. It allows for cross-platform polling of I/O events.
