1 unstable release
new 0.0.1 | Nov 13, 2024 |
---|
#68 in #async-executor
148 downloads per month
Used in 13 crates
(3 directly)
5KB
๐โโ๏ธ future-runner
A lightweight Rust crate that gives your futures the exercise they need! Whether you're running on native platforms or WASM, blocking or non-blocking, we've got you covered.
โจ Features
- ๐ฏ Cross-platform support (Native & WASM)
- ๐ Configurable execution modes
- ๐งต Optional threaded execution
- ๐ซ Non-blocking mode available
- ๐ฎ Super simple API
๐จ Feature Flags
threaded
- Enables thread-based executionblock
- Enables blocking execution mode
๐ฆ Installation
To use future-runner
, add it to your Cargo.toml
:
[dependencies]
future-runner = "0.0.1"
License
This project is licensed under the MIT License - see the LICENSE file for details.
lib.rs
:
future-runner
A lightweight crate for executing Rust futures on different target platforms.
Features
- Cross-platform future execution support (native and WASM)
- Configurable blocking/non-blocking execution via features
- Simple API with a single
run_future
function
Usage
use future_runner::run_future;
async fn my_async_task() {
// Your async code here
}
fn main() {
run_future(my_async_task());
}
Dependencies
~5โ18MB
~244K SLoC