Crate agnostic

Source
Expand description

Agnostic

agnostic is an agnostic abstraction layer for any async runtime.

If you want a light weight crate, see agnostic-lite.

github LoC Build codecov

docs.rs crates.io crates.io license

§Introduction

An agnostic abstraction layer for any async runtime.

If you want a light weight crate, see agnostic-lite.

§Installation

[dependencies]
agnostic = "0.7"
§License

agnostic is under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE, LICENSE-MIT for details.

Copyright (c) 2025 Al Liu.

Re-exports§

pub use agnostic_io as io;

Modules§

async_stdasync-std
async_std runtime adapter
dnsdns
Agnostic async DNS provider.
netnet
Network related traits
processprocess
Process related traits
quinnquinn
Quinn related traits
smolsmol
smol runtime adapter
time
Time related traits
tokiotokio
tokio runtime adapter

Macros§

cfg_async_std
Macro to conditionally compile items for async-std feature
cfg_linux
Macro to conditionally compile items for linux system
cfg_smol
Macro to conditionally compile items for smol feature
cfg_tokio
Macro to conditionally compile items for tokio feature
cfg_unix
Macro to conditionally compile items for unix system
cfg_windows
Macro to conditionally compile items for windows system

Enums§

AfterHandleError
Error of AfterHandle’s output

Traits§

AfterHandle
The handle returned by the AsyncAfterSpawner when a after future is spawned.
AsyncAfterSpawner
A spawner trait for spawning futures. Go’s time.AfterFunc equivalent.
AsyncBlockingSpawner
A spawner trait for spawning blocking.
AsyncLocalSpawner
A spawner trait for spawning futures.
AsyncSpawner
A spawner trait for spawning futures.
JoinHandle
Joinhanlde trait
LocalJoinHandle
Joinhanlde trait
Runtime
Runtime trait
RuntimeLite
Runtime trait
Yielder
Yielder hints the runtime to execution back