About this project
asupersync is an async runtime for Rust designed around the principle that correctness should be structural rather than enforced at runtime. It provides a foundation for writing asynchronous Rust code where safety properties are baked into the type system and task ownership model.
Key design pillars:
- Region-owned tasks: Tasks are bound to explicit regions, giving developers fine-grained control over task lifetimes and preventing leaks or dangling references in async contexts.
- Cancel-correct protocols: Cancellation is handled through protocols that guarantee cleanup, resource release, and state consistency even when tasks are aborted mid-execution. This avoids the classic Rust async problem of cancelled futures leaving side effects in an undefined state.
- Capability-gated effects: Operations that produce observable effects are gated behind capability tokens. Only code holding the appropriate capability can perform the effect, making side effects explicit and auditable at compile time.
- Deterministic replay testing: The runtime supports deterministic replay, allowing tests to record and replay async execution traces. This makes non-deterministic concurrency bugs reproducible and debuggable.
The library targets developers building systems where async correctness is critical—such as infrastructure services, concurrent systems, and safety-sensitive applications—where conventional async runtimes may allow silent correctness violations. It is published under the MIT license.
Comments
0 people shared their preference · Deer Point appears after 10 participants
Sign in to join the discussion.