#async-channel #no-std #future #async

no-std async-unsync

asynchronous, unsynchronized (thread-local) channels and semaphores

6 releases

0.3.0 Mar 12, 2024
0.2.2 May 3, 2023
0.2.1 Apr 30, 2023
0.1.1 Apr 8, 2023
0.1.0 Mar 31, 2023

#853 in Asynchronous

Download history 1267/week @ 2025-08-30 1110/week @ 2025-09-06 610/week @ 2025-09-13 778/week @ 2025-09-20 802/week @ 2025-09-27 922/week @ 2025-10-04 972/week @ 2025-10-11 895/week @ 2025-10-18 784/week @ 2025-10-25 878/week @ 2025-11-01 969/week @ 2025-11-08 830/week @ 2025-11-15 769/week @ 2025-11-22 1837/week @ 2025-11-29 2199/week @ 2025-12-06 485/week @ 2025-12-13

5,494 downloads per month
Used in 2 crates

MIT/Apache

135KB
2.5K SLoC

async-unsync - Single Threaded Async Channels

Build Status crates.io

A Rust library for asynchronous but unsynchronized (single-threaded) communication primitives, primarily channels and semaphores with an API that is designed to be as similar to tokio::sync as possible.

Most async executors use multi-threaded runtimes and consequently, most synchronization primitives are implemented to be thread-safe, thus incurring the associated synchronization overhead. By restricting their use to single-threaded/thread-local tasks only, the synchronization overhead can be entirely avoided, resulting in up to 10x faster channel operations.

Usage

To use this crate, add the following to your Cargo.toml:

[dependencies]
async-unsync = "0.2.2"

Cargo Features

  • std: Enabled by default, includes alloc and adds Error implementations for error types
  • alloc: Enabled by default, required for bounded and unbounded channels

License

This project is licensed under either of

at your choice.

Dependencies

~0–3MB
~54K SLoC