mirror of https://github.com/smol-rs/smol
bc0acdd308
Add AsRawFd/RawSocket on types with trait bound of them |
||
---|---|---|
examples | ||
piper | ||
src | ||
.gitignore | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md | ||
certificate.pem | ||
identity.pfx |
README.md
smol
A small and fast async runtime.
Goals
- Small - Around 1500 lines of code.
- Fast - On par with async-std and Tokio.
- Safe - Written in 100% safe Rust.
- Complete - Fully featured and ready for production.
- Documented - Simple code, easy to understand and modify.
- Lightweight - Small dependencies, relies on epoll/kqueue/wepoll.
- Portable - Linux, Android, macOS, iOS, Windows, FreeBSD, OpenBSD, NetBSD, DragonFly BSD.
Features
- Executor - Configurable threads, work stealing, supports non-send futures.
- Blocking - Thread pool for isolating blocking code.
- Networking - TCP, UDP, Unix domain sockets, and custom files/sockets.
- Process - Spawns child processes and interacts with their I/O.
- Files - Filesystem manipulation operations.
- Stdio - Asynchronous stdin, stdout, and stderr.
- Timer - Efficient userspace timers.
Documentation
cargo doc --document-private-items --no-deps --open
TODO Crate recommendations
TODO certificate and private key
// To access the HTTPS version, import the certificate into Chrome/Firefox:
// 1. Open settings and go to the certificate 'Authorities' list
// 2. Click 'Import' and select certificate.pem
// 3. Enable 'Trust this CA to identify websites' and click OK
// 4. Restart the browser and go to https://127.0.0.1:8001
//
// The certificate was generated using minica and openssl:
// 1. minica --domains localhost -ip-addresses 127.0.0.1 -ca-cert certificate.pem
// 2. openssl pkcs12 -export -out identity.pfx -inkey localhost/key.pem -in localhost/cert.pem
Examples
- Async-h1 client
- Async-h1 server
- Chat Client
- Chat Server
- Compat reqwest
- Compat tokio
- Ctrl-c
- Hyper Client
- Hyper Server
- Linux Inotify
- Linux Timefd
- Process Output
- Process Run
- Read Dir
- Read File
- Simple Client
- Simple Server
- Stdin to Stdout
- Tcp Client
- Tcp Server
- Thread Pool
- Timer Sleep
- Timer Timeout
- TLS Client
- TLS Server
- Unix Signal
- Web Crawler
- Websocket Client
- WebSocket Server
- Windows Uds
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.