The problem / use case
Right now processkit has a hard dependency on the tokio async runtime.
ProcessKit should support alternate runtimes. The smol runtime is very popular and is more modular than tokio.
Many of my apps don't use async runtimes at all, so I am particularly interested in using minimal runtimes like pollster which simply blocks until futures are complete.
Proposed solution
Much of the functionality in tokio is also accessible through the futures crate.
Functionality that requires tokio-specific APIs should be made optional and hidden behind a feature gate. In the next major version, make the tokio specific feature flags off by default.
The smol-rs GitHub organization provides some additional abstractions that work on both tokio and smol runtimes. These should also be feature gated (but on by default) in case the user wants to use a minimal runtimes like pollster.
Alternatives considered
Continue with tokio as a required dependency, requiring users to use compatibility shims.
I suggest making tokio-specific functionality off by default. However, this would be a breaking change and so may be delayed until the next major release (either v3 or v4).
The problem / use case
Right now processkit has a hard dependency on the tokio async runtime.
ProcessKit should support alternate runtimes. The
smolruntime is very popular and is more modular than tokio.Many of my apps don't use async runtimes at all, so I am particularly interested in using minimal runtimes like pollster which simply blocks until futures are complete.
Proposed solution
Much of the functionality in tokio is also accessible through the
futurescrate.Functionality that requires tokio-specific APIs should be made optional and hidden behind a feature gate. In the next major version, make the tokio specific feature flags off by default.
The smol-rs GitHub organization provides some additional abstractions that work on both tokio and smol runtimes. These should also be feature gated (but on by default) in case the user wants to use a minimal runtimes like pollster.
Alternatives considered
Continue with tokio as a required dependency, requiring users to use compatibility shims.
I suggest making tokio-specific functionality off by default. However, this would be a breaking change and so may be delayed until the next major release (either v3 or v4).