#future #async-executor #executor #run-time #async

future-runner

A lightweight future executor with WASM support and configurable runtime options for async Rust applications

1 unstable release

new 0.0.1 Nov 13, 2024

#68 in #async-executor

Download history 148/week @ 2024-11-11

148 downloads per month
Used in 13 crates (3 directly)

MIT license

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 execution
  • block - 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