pasts
pasts copied to clipboard
Minimal and simpler alternative to the futures crate.
Pasts
Changelog | Source | Getting Started
Minimal and simpler alternative to the futures crate.
The pasts asynchronous runtime is designed for creating user-space software and embedded software using an asynchronous event loop. It aims to abstract away all of the pain points of using asynchronous Rust. Pasts is purposely kept small with the entire source directory under 500 lines of Rust code.
Check out the documentation for examples.
Goals
- No unsafe (safe and sound)
- No required std (only a single allocation required - see one_alloc)
- No macros (fast compile times)
- No dependencies[^1] (bloat-free)
- No cost (true zero-cost abstractions)
- No pain (API super easy to learn & use)
- No platform-specific API differences (code works everywhere).
Supported Platforms
Pasts targets all platforms that can run Rust. The executor works on at least the following platforms (may work on others):
- All platforms that support threading (includes all tier 1 and some tier 2, 3)
- Web Assembly In Browser (Tier 2)
- No standard devices (Tiers 2 and 3)
License
Licensed under any of
- Apache License, Version 2.0, (LICENSE_APACHE_2_0.txt or https://www.apache.org/licenses/LICENSE-2.0)
- Boost Software License, Version 1.0, (LICENSE_BOOST_1_0.txt or https://www.boost.org/LICENSE_1_0.txt)
- MIT License, (LICENSE_MIT.txt or https://mit-license.org/)
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 licensed as described above, without any additional terms or conditions.
Help
If you want help using or contributing to this library, feel free to send me an email at [email protected].
Related Projects
Since pasts is not an all-in-one async runtime solution, here's a list of crates that are designed to work with pasts:
- Whisk - A no-std-compatible MPMC (multi-producer/multiple-consumer) asynchronous channel implementation
-
Smelling Salts - Abstraction
over OS APIs to handle asynchronous device waking by implementing
Notifier
[^1]: Some features require a platform integration dependency, for instance:
- web
pulls in wasm-bindgen-futures
- no-std
pulls in pin-utils