// the find
fereidani/kanal
The fast sync and async channel that Rust deserves
Kanal is a Rust channel library that unifies sync and async message passing under one API, with serious benchmark numbers to back the performance claims. It targets anyone building concurrent Rust systems who is frustrated by the sync/async boundary in std channels or crossbeam. The Go-style channel close semantics are a deliberate design choice, not an accident.
1. The sync/async bridging (as_sync(), as_async(), to_sync()) is genuinely useful — mixing tokio tasks with OS threads over the same channel without wrapper types is a real pain point this solves cleanly. 2. The pointer-size serialization trick for small values (encoding data as the pointer address itself) eliminates heap allocations on bounded(0) channels, which matters a lot for high-frequency signaling. 3. Benchmarks are reproducible — the benchmark repo is public, machine specs are listed, and Go channels are included as a meaningful baseline rather than just comparing against slower Rust crates. 4. MPMC support out of the box, unlike std::sync::mpsc which is MPSC only and requires crossbeam or flume for the multi-consumer case.
1. Only 50 forks and sparse commit activity since mid-2025 — for a foundational concurrency primitive you want to know it's being actively maintained when soundness bugs surface. 2. The custom mutex is a bet: 'specially tuned for predictable internal lock time' is fine until your workload violates that assumption, and you have no fallback except the std-mutex feature flag which likely hurts throughput. 3. No select! macro support mentioned anywhere obvious — crossbeam and flume both have it, and the absence makes kanal a non-starter for any code that needs to wait on multiple channels simultaneously. 4. At 0.1.x the API is not stable; adopting this as a core dependency in a production service means accepting breaking changes without the semver guarantees you'd get from a 1.x crate.