# smol-rs/smol

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/smol-rs-smol).**

4,773 stars · 186 forks · Rust · apache-2.0

## Links

- GitHub: https://github.com/smol-rs/smol
- awesome-repositories: https://awesome-repositories.com/repository/smol-rs-smol.md

## Topics

`async` `concurrency` `futures` `networking` `runtime` `rust`

## Description

Smol is a lightweight Rust asynchronous runtime and task executor. It provides a suite of foundational tools for scheduling and executing asynchronous futures, managing background workloads, and handling non-blocking network and file operations.

The project includes a compatibility layer for adapting asynchronous types and execution contexts, enabling futures to run across different runtime ecosystems. It also features a mechanism to offload synchronous I/O and CPU-intensive operations to dedicated worker thread pools to prevent runtime stalls.

Its capabilities cover non-blocking network I/O for TCP, UDP, and Unix connections, as well as asynchronous filesystem operations and system process management. For coordinating shared state, it provides a suite of concurrency primitives including asynchronous mutexes, semaphores, and channels. Additional functionality includes timed event scheduling for delayed or recurring tasks.

## Tags

### Programming Languages & Runtimes

- [Async I/O Runtimes](https://awesome-repositories.com/f/programming-languages-runtimes/async-i-o-runtimes.md) — Acts as a lightweight async runtime providing the core event loop and task scheduler for Rust applications.
- [Asynchronous Runtime Adapters](https://awesome-repositories.com/f/programming-languages-runtimes/asynchronous-runtime-adapters.md) — Provides abstraction layers that enable asynchronous futures to operate across different runtime implementations.
- [Concurrency Primitives](https://awesome-repositories.com/f/programming-languages-runtimes/concurrency-primitives.md) — Implements essential synchronization constructs such as asynchronous mutexes, semaphores, and channels.
- [Asynchronous Runtime Compatibility](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtimes/deployment-specific-runtimes/backend-runtimes/asynchronous-runtime-compatibility.md) — Offers a compatibility layer for detecting and utilizing event loops to execute tasks across different runtimes. ([source](https://docs.rs/async-compat))
- [Blocking I/O Offloading](https://awesome-repositories.com/f/programming-languages-runtimes/async-i-o-runtimes/blocking-i-o-offloading.md) — Includes a utility to offload synchronous I/O operations to a dedicated thread pool to prevent runtime stalls. ([source](https://cdn.jsdelivr.net/gh/smol-rs/smol@master/README.md))
- [Trait Adaptation Layers](https://awesome-repositories.com/f/programming-languages-runtimes/async-i-o-runtimes/trait-adaptation-layers.md) — A utility for converting asynchronous input and output traits between different ecosystems to ensure compatibility across various libraries. ([source](https://docs.rs/async-compat))
- [Blocking Operation Handlers](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/concurrency/execution-models/multi-threaded-execution/thread-join-operations/blocking-operation-handlers.md) — Offloads synchronous I/O and CPU-intensive computations to worker threads to maintain runtime responsiveness. ([source](https://docs.rs/smol))
- [Thread Pools](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/concurrency/task-orchestration-frameworks/thread-pools.md) — Manages a collection of worker threads to handle synchronous I/O and CPU-heavy operations.
- [Timer Schedulers](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/timer-schedulers.md) — Includes interfaces for scheduling asynchronous tasks using delayed timeouts and recurring intervals.

### Development Tools & Productivity

- [Blocking Task Offloaders](https://awesome-repositories.com/f/development-tools-productivity/task-execution/blocking-task-offloaders.md) — Provides mechanisms to offload synchronous CPU-intensive tasks to dedicated thread pools.

### DevOps & Infrastructure

- [Waker-Based Schedulers](https://awesome-repositories.com/f/devops-infrastructure/automation-orchestration/task-execution-frameworks/task-job-management/task-schedulers/os-scheduling-simulations/task-schedulers/waker-based-schedulers.md) — Implements a task executor that manages future progression using the standard library waker mechanism.

### Networking & Communication

- [Non-Blocking Socket I/O](https://awesome-repositories.com/f/networking-communication/socket-networking/non-blocking-socket-i-o.md) — Ships non-blocking socket I/O for handling multiple TCP and UDP streams asynchronously.

### Operating Systems & Systems Programming

- [Asynchronous I/O Libraries](https://awesome-repositories.com/f/operating-systems-systems-programming/asynchronous-i-o-libraries.md) — Provides a comprehensive library of non-blocking interfaces for system I/O operations. ([source](https://docs.rs/smol))
- [Non-Blocking I/O Interfaces](https://awesome-repositories.com/f/operating-systems-systems-programming/asynchronous-i-o-libraries/non-blocking-i-o-interfaces.md) — Implements non-blocking I/O interfaces that monitor multiple network sockets and files via OS event notifications.
- [Asynchronous File Access](https://awesome-repositories.com/f/operating-systems-systems-programming/file-system-access/asynchronous-file-access.md) — Provides non-blocking utilities for reading and writing files on the local filesystem. ([source](https://cdn.jsdelivr.net/gh/smol-rs/smol@master/README.md))
- [External Process Management](https://awesome-repositories.com/f/operating-systems-systems-programming/external-process-management.md) — Enables spawning and controlling external system processes using non-blocking communication.

### Software Engineering & Architecture

- [Async-Sync Compatibility Layers](https://awesome-repositories.com/f/software-engineering-architecture/async-sync-compatibility-layers.md) — Provides architectural mechanisms to ensure interoperability between different asynchronous runtime ecosystems.
- [Asynchronous File I/O](https://awesome-repositories.com/f/software-engineering-architecture/non-blocking-io-architectures/asynchronous-file-i-o.md) — Provides non-blocking interfaces for reading and writing files to prevent runtime stalls.
- [Asynchronous Schedulers](https://awesome-repositories.com/f/software-engineering-architecture/task-scheduling/asynchronous-schedulers.md) — Implements an asynchronous scheduler that maps computational tasks to thread pools for non-blocking execution. ([source](https://cdn.jsdelivr.net/gh/smol-rs/smol@master/README.md))
- [Asynchronous Task Executors](https://awesome-repositories.com/f/software-engineering-architecture/task-scheduling/asynchronous-schedulers/asynchronous-thread-schedulers/custom-thread-executors/asynchronous-task-executors.md) — Ships a task executor that schedules and runs asynchronous futures on global or local thread pools.
- [Asynchronous Synchronization Primitives](https://awesome-repositories.com/f/software-engineering-architecture/asynchronous-synchronization-primitives.md) — Provides a suite of asynchronous mutexes and semaphores to coordinate access to shared state. ([source](https://cdn.jsdelivr.net/gh/smol-rs/smol@master/README.md))
- [Scoped Task Synchronization](https://awesome-repositories.com/f/software-engineering-architecture/concurrency-models/asynchronous-task-execution/scoped-task-synchronization.md) — Implements mechanisms to coordinate the completion of parallel operations and resource access. ([source](https://docs.rs/smol))
- [Message Passing Channels](https://awesome-repositories.com/f/software-engineering-architecture/message-passing-channels.md) — Provides synchronized communication primitives for exchanging data between concurrent asynchronous tasks.

### System Administration & Monitoring

- [Event-Driven I/O](https://awesome-repositories.com/f/system-administration-monitoring/administrative-operations/linux-system-administration/networking/connection-lifecycle-management/parallel-network-i-o/event-driven-i-o.md) — Implements event-driven I/O to handle TCP, UDP, and Unix connections asynchronously. ([source](https://cdn.jsdelivr.net/gh/smol-rs/smol@master/README.md))

### Part of an Awesome List

- [Process Management](https://awesome-repositories.com/f/awesome-lists/devtools/process-management.md) — Provides interfaces for interacting with system processes while maintaining application responsiveness. ([source](https://docs.rs/smol))
