#thread-pool #tokio #rayon #async

tokio-rayon

Mix async code with CPU-heavy thread pools using Tokio + Rayon

4 releases (stable)

2.1.0 Apr 5, 2021
2.0.0 Apr 4, 2021
1.0.0 Apr 2, 2021
0.1.0 Apr 2, 2021

#390 in Asynchronous

Download history 22924/week @ 2025-08-18 23308/week @ 2025-08-25 23466/week @ 2025-09-01 25995/week @ 2025-09-08 104166/week @ 2025-09-15 168699/week @ 2025-09-22 154039/week @ 2025-09-29 193190/week @ 2025-10-06 148315/week @ 2025-10-13 135357/week @ 2025-10-20 171829/week @ 2025-10-27 174098/week @ 2025-11-03 164478/week @ 2025-11-10 177164/week @ 2025-11-17 60684/week @ 2025-11-24 81909/week @ 2025-12-01

488,382 downloads per month
Used in 38 crates (12 directly)

MIT license

15KB
250 lines

tokio-rayon

Mix async code with CPU-heavy thread pools using Tokio + Rayon

Documentation Build status Test coverage
crates.io Downloads Rust version
MIT license

Resources

TL;DR

Sometimes, you're doing async stuff, and you also need to do CPU-heavy stuff. This library will help!

let nft = tokio_rayon::spawn_async(|| {
  do_some_crypto_stuff()
}).await?;

assert_eq!(nft, ExpensiveNft);

Dependencies

~3–6MB
~102K SLoC