Gears is an experimental asynchronous programming library for Scala 3 that enables direct-style async programming with structured concurrency. It provides Futures for concurrent computations, Channels for communication between computations, and an Async context for managing execution. The library works across JVM (with virtual threads), Scala Native, and Scala.js (with Wasm support), implementing structured concurrency principles with automatic cancellation propagation. The architecture features a shared core with platform-specific implementations, using delimited continuations or fibers for suspension/resume operations.
This repository is a Rust library providing structured concurrency primitives for async programming. It offers operations such as `join`, `race`, `try_join`, `race_ok` for futures, and `merge`, `chain`, `zip` for streams, supporting tuples up to 12 elements, arrays, and `Vec` (with alloc feature). It also includes `FutureGroup` and `StreamGroup` for dynamic collections, and a `ConcurrentStream` trait for processing streams concurrently with backpressure and bounded concurrency. The library is runtime-agnostic (works with tokio, async-std, smol, etc.) and supports `no_std` environments. The code extensively uses pin projection, `ManuallyDrop`, and custom waker arrays with bit-set readiness tracking to achieve efficient polling and cancellation. It provides benchmark comparisons against `futures-rs` demonstrating competitive performance. There are no data pipelines, notebooks, or research elements; this is a pure library for async concurrency.