GitPedia

Smol

A small and fast async runtime for Rust

From smol-rs·Updated June 19, 2026·View on GitHub·

[]( https://github.com/smol-rs/smol/actions) []( https://github.com/smol-rs/smol) []( https://crates.io/crates/smol) []( https://docs.rs/smol) []( https://matrix.to/#/#smol-rs:matrix.org) The project is written primarily in Rust, distributed under the Apache License 2.0 license, first published in 2020. It has gained significant community traction with 4,973 stars and 189 forks on GitHub. Key topics include: async, concurrency, futures, networking, runtime.

Latest release: v2.0.2
September 7, 2024View Changelog →

smol

Build
License
Cargo
Documentation
Chat

<img src="https://raw.githubusercontent.com/smol-rs/smol/master/assets/images/logo_fullsize_transparent.png" alt="kitty" width="100px" style="float: left;" />

A small and fast async runtime.

This crate simply re-exports other smaller async crates (see the source).

To use tokio-based libraries with smol, apply the async-compat adapter to futures and I/O
types.

See the smol-macros crate if you want a no proc-macro, fast compiling, easy-to-use
async main and/or multi-threaded Executor setup out of the box.

Examples

Connect to an HTTP website, make a GET request, and pipe the response to the standard output:

rust
use smol::{io, net, prelude::*, Unblock}; fn main() -> io::Result<()> { smol::block_on(async { let mut stream = net::TcpStream::connect("example.com:80").await?; let req = b"GET / HTTP/1.1\r\nHost: example.com\r\nConnection: close\r\n\r\n"; stream.write_all(req).await?; let mut stdout = Unblock::new(std::io::stdout()); io::copy(stream, &mut stdout).await?; Ok(()) }) }

There's a lot more in the examples directory.

Subcrates

TLS certificate

Some code examples are using TLS for authentication. The repository
contains a self-signed certificate usable for testing, but it should not
be used for real-world scenarios. Browsers and tools like curl will
show this certificate as insecure.

In browsers, accept the security prompt or use curl -k on the
command line to bypass security warnings.

The certificate file was generated using
minica and
openssl:

text
minica --domains localhost -ip-addresses 127.0.0.1 -ca-cert certificate.pem openssl pkcs12 -export -out identity.pfx -inkey localhost/key.pem -in localhost/cert.pem

Another useful tool for making certificates is mkcert.

MSRV Policy

The Minimum Supported Rust Version (MSRV) of this crate is 1.85. As a tentative policy, the MSRV will not advance past the current Rust version provided by Debian Stable. At the time of writing, this version of Rust is 1.85. However, the MSRV may be advanced further in the event of a major ecosystem shift or a security vulnerability.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.

Contributors

Showing top 12 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from smol-rs/smol via the GitHub API.Last fetched: 6/19/2026