docs.rs failed to build anyspawn-0.5.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: anyspawn-0.5.5

Anyspawn

crate.io docs.rs MSRV CI Coverage License

A generic task spawner compatible with any async runtime.

This crate provides a Spawner type that abstracts task spawning across different async runtimes without generic infection.

Design Philosophy

  • Concrete type: No generics needed in your code
  • Simple: Use built-in constructors or implement SpawnCustom
  • Layered: Compose middleware closures via CustomSpawnerBuilder
  • Flexible: Works with any async runtime

Quick Start

Using Tokio

use anyspawn::Spawner;

let spawner = Spawner::new_tokio();
let result = spawner.spawn(async { 1 + 1 }).await;
assert_eq!(result, 2);

Thread-Aware Support

Spawner implements ThreadAware and supports per-core isolation via custom SpawnCustom implementations, enabling contention-free, NUMA-friendly task dispatch.

Features