Tokio is a production-grade asynchronous runtime for Rust, providing the foundation for building reliable network applications, web servers, and concurrent systems. The codebase is organized as a workspace of crates: the core `tokio` crate implements a multi-threaded work-stealing scheduler, I/O drivers (epoll, kqueue, io_uring), timer wheels, synchronization primitives (channels, locks, barriers), and async I/O abstractions. Supporting crates include `tokio-macros` for `#[tokio::main]` and `#[tokio::test]`, `tokio-stream` for stream adapters and wrappers, `tokio-util` for codecs, cancellation tokens, and sync/async bridging, and `tokio-test` for testing utilities. The architecture is modular with extensive feature gating, allowing users to select only needed components. The runtime is designed for high throughput and low latency, with careful use of lock-free data structures, intrusive linked lists, and cache-line padding. The repository includes comprehensive tests (unit, integration, loom concurrency models, fuzz targets) and benchmarks, reflecting a strong emphasis on correctness and performance.
jlrs is a Rust library that provides safe, high-performance bindings to the Julia C API, enabling both embedding Julia within Rust applications and exporting Rust functions as Julia modules (via ccall). The architecture is modular, with separate crates for raw FFI (`jl_sys`, `jlrs_sys`), a proc-macro crate (`jlrs_macros`) for derive macros and the `julia_module!` macro, and the main `jlrs` crate offering managed types (`Value`, `Array`, `DataType`), memory safety through scoped GC frames, and multiple runtime modes (local, async via tokio, multi-threaded). The library handles Julia’s garbage collector carefully with custom GC-safe locks and fast thread-local state, and supports advanced features like static arrays, ndarray integration, and opaque Rust types managed by Julia. Key entry points are the `Builder` struct for initializing Julia, runtime handles (`LocalHandle`, `AsyncHandle`, `MtHandle`), and the `julia_module!` macro for exposing Rust code. The codebase is well-tested with integration tests, benchmarks, and CI across Julia LTS and stable versions on Linux, macOS, and Windows.
Smol is a lightweight async runtime for Rust that bundles several well-known subcrates (async-executor, async-io, async-net, async-fs, async-process, async-channel, async-lock, blocking, futures-lite) into a single convenient dependency. It provides a global executor initialized lazily with configurable thread count via the SMOL_THREADS environment variable, and exposes a simple API (smol::spawn, smol::block_on, smol::Async, smol::Timer, smol::Unblock, etc.) for writing async programs. The source code itself is thin—primarily re-exports from subcrates plus a spawn module that sets up the global executor. This makes smol an excellent entry point for Rust async development without the complexity of larger runtimes like tokio. The repository includes a rich set of examples covering TCP, TLS, HTTP, WebSocket, file I/O, process management, and platform-specific features like inotify and timerfd. The codebase is well-maintained, uses modern Rust practices (edition 2021, MSRV 1.85, no unsafe), and has active CI and dependabot configuration.