{"id":13477929,"url":"https://github.com/smol-rs/smol","last_synced_at":"2025-05-13T16:03:35.752Z","repository":{"id":40989534,"uuid":"238175846","full_name":"smol-rs/smol","owner":"smol-rs","description":"A small and fast async runtime for Rust","archived":false,"fork":false,"pushed_at":"2025-03-10T13:10:24.000Z","size":1014,"stargazers_count":4152,"open_issues_count":18,"forks_count":162,"subscribers_count":75,"default_branch":"master","last_synced_at":"2025-05-06T16:06:44.005Z","etag":null,"topics":["async","concurrency","futures","networking","runtime","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smol-rs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-04T10:07:52.000Z","updated_at":"2025-05-06T09:57:24.000Z","dependencies_parsed_at":"2023-02-09T21:00:22.688Z","dependency_job_id":"bae0d2d0-69e2-4e13-916a-1c9c83dadce0","html_url":"https://github.com/smol-rs/smol","commit_stats":{"total_commits":515,"total_committers":37,"mean_commits":13.91891891891892,"dds":0.2834951456310679,"last_synced_commit":"f0cd8e37d91e82c9235b10353619ad9af04a01fb"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smol-rs%2Fsmol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smol-rs%2Fsmol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smol-rs%2Fsmol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smol-rs%2Fsmol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smol-rs","download_url":"https://codeload.github.com/smol-rs/smol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253837406,"owners_count":21971983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","concurrency","futures","networking","runtime","rust"],"created_at":"2024-07-31T16:01:49.982Z","updated_at":"2025-05-13T16:03:35.734Z","avatar_url":"https://github.com/smol-rs.png","language":"Rust","funding_links":[],"categories":["Rust","rust","Libraries","HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# smol\n\n[![Build](https://github.com/smol-rs/smol/actions/workflows/ci.yml/badge.svg)](\nhttps://github.com/smol-rs/smol/actions)\n[![License](https://img.shields.io/badge/license-Apache--2.0_OR_MIT-blue.svg)](\nhttps://github.com/smol-rs/smol)\n[![Cargo](https://img.shields.io/crates/v/smol.svg)](\nhttps://crates.io/crates/smol)\n[![Documentation](https://docs.rs/smol/badge.svg)](\nhttps://docs.rs/smol)\n[![Chat](https://img.shields.io/matrix/smol-rs%3Amatrix.org)](\nhttps://matrix.to/#/#smol-rs:matrix.org)\n\n\u003cimg src=\"https://raw.githubusercontent.com/smol-rs/smol/master/assets/images/logo_fullsize_transparent.png\" alt=\"kitty\" width=\"100px\" style=\"float: left;\" /\u003e\n\nA small and fast async runtime.\n\nThis crate simply re-exports other smaller async crates (see the source).\n\nTo use tokio-based libraries with smol, apply the [`async-compat`] adapter to futures and I/O\ntypes.\n\nSee the [`smol-macros`] crate if you want a no proc-macro, fast compiling, easy-to-use\nasync main and/or multi-threaded Executor setup out of the box.\n\n## Examples\n\nConnect to an HTTP website, make a GET request, and pipe the response to the standard output:\n\n```rust,no_run\nuse smol::{io, net, prelude::*, Unblock};\n\nfn main() -\u003e io::Result\u003c()\u003e {\n    smol::block_on(async {\n        let mut stream = net::TcpStream::connect(\"example.com:80\").await?;\n        let req = b\"GET / HTTP/1.1\\r\\nHost: example.com\\r\\nConnection: close\\r\\n\\r\\n\";\n        stream.write_all(req).await?;\n\n        let mut stdout = Unblock::new(std::io::stdout());\n        io::copy(stream, \u0026mut stdout).await?;\n        Ok(())\n    })\n}\n```\n\nThere's a lot more in the [examples] directory.\n\n[`async-compat`]: https://docs.rs/async-compat/latest/async_compat/\n[`smol-macros`]: https://docs.rs/smol-macros/latest/smol_macros/\n[examples]: https://github.com/smol-rs/smol/tree/master/examples\n\n## Subcrates\n\n- [async-channel] - Multi-producer multi-consumer channels\n- [async-executor] - Composable async executors\n- [async-fs] - Async filesystem primitives\n- [async-io] - Async adapter for I/O types, also timers\n- [async-lock] - Async locks (barrier, mutex, reader-writer lock, semaphore)\n- [async-net] - Async networking primitives (TCP/UDP/Unix)\n- [async-process] - Async interface for working with processes\n- [async-task] - Task abstraction for building executors\n- [blocking] - A thread pool for blocking I/O\n- [futures-lite] - A lighter fork of [futures]\n- [polling] - Portable interface to epoll, kqueue, event ports, and wepoll\n\n[async-io]: https://github.com/smol-rs/async-io\n[polling]: https://github.com/smol-rs/polling\n[nb-connect]: https://github.com/smol-rs/nb-connect\n[async-executor]: https://github.com/smol-rs/async-executor\n[async-task]: https://github.com/smol-rs/async-task\n[blocking]: https://github.com/smol-rs/blocking\n[futures-lite]: https://github.com/smol-rs/futures-lite\n[smol]: https://github.com/smol-rs/smol\n[async-net]: https://github.com/smol-rs/async-net\n[async-process]: https://github.com/smol-rs/async-process\n[async-fs]: https://github.com/smol-rs/async-fs\n[async-channel]: https://github.com/smol-rs/async-channel\n[concurrent-queue]: https://github.com/smol-rs/concurrent-queue\n[event-listener]: https://github.com/smol-rs/event-listener\n[async-lock]: https://github.com/smol-rs/async-lock\n[fastrand]: https://github.com/smol-rs/fastrand\n[futures]: https://github.com/rust-lang/futures-rs\n\n## TLS certificate\n\nSome code examples are using TLS for authentication. The repository\ncontains a self-signed certificate usable for testing, but it should **not**\nbe used for real-world scenarios. Browsers and tools like curl will\nshow this certificate as insecure.\n\nIn browsers, accept the security prompt or use `curl -k` on the\ncommand line to bypass security warnings.\n\nThe certificate file was generated using\n[minica](https://github.com/jsha/minica) and\n[openssl](https://www.openssl.org/):\n\n```text\nminica --domains localhost -ip-addresses 127.0.0.1 -ca-cert certificate.pem\nopenssl pkcs12 -export -out identity.pfx -inkey localhost/key.pem -in localhost/cert.pem\n```\n\nAnother useful tool for making certificates is [mkcert].\n\n[mkcert]: https://github.com/FiloSottile/mkcert\n\n## MSRV Policy\n\nThe Minimum Supported Rust Version (MSRV) of this crate is **1.63**. As a **tentative** policy, the MSRV will not advance past the [current Rust version provided by Debian Stable](https://packages.debian.org/stable/rust/rustc). At the time of writing, this version of Rust is *1.63*. However, the MSRV may be advanced further in the event of a major ecosystem shift or a security vulnerability.\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n#### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmol-rs%2Fsmol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmol-rs%2Fsmol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmol-rs%2Fsmol/lists"}