| Crates.io | agnostic |
| lib.rs | agnostic |
| version | 0.8.0 |
| created_at | 2023-06-14 18:55:39.285735+00 |
| updated_at | 2025-11-04 03:05:17.134681+00 |
| description | An agnostic abstraction layer for any async runtime. |
| homepage | https://github.com/al8n/agnostic |
| repository | https://github.com/al8n/agnostic |
| max_upload_size | |
| id | 890435 |
| size | 82,691 |
agnostic is an agnostic abstraction layer for any async runtime.
If you want a light weight crate, see agnostic-lite.
agnostic is a comprehensive, runtime-agnostic abstraction layer for async Rust. It provides a unified API for task spawning, networking, DNS resolution, process management, and QUIC protocol support - all working seamlessly with tokio, or smol.
Looking for a lightweight option? Check out agnostic-lite for a minimal, no_std-compatible core.
[dependencies]
agnostic = "0.8"
Choose one runtime feature:
# For tokio
agnostic = { version = "0.8", features = ["tokio"] }
# For smol
agnostic = { version = "0.8", features = ["smol"] }
# Enable networking
agnostic = { version = "0.8", features = ["tokio", "net"] }
# Enable DNS resolution
agnostic = { version = "0.8", features = ["tokio", "dns"] }
# Enable DNS over HTTPS with rustls
agnostic = { version = "0.8", features = ["tokio", "dns-over-https-rustls"] }
# Enable DNS over QUIC
agnostic = { version = "0.8", features = ["tokio", "dns-over-quic"] }
# Enable DNSSEC
agnostic = { version = "0.8", features = ["tokio", "dnssec-ring"] }
# Enable process management
agnostic = { version = "0.8", features = ["tokio", "process"] }
# Enable Quinn QUIC
agnostic = { version = "0.8", features = ["tokio", "quinn"] }
std (default): Standard library supportalloc: Allocation supporttokio: Tokio runtime supportsmol: Smol runtime supportnet: Network abstractions (TCP, UDP)dns: DNS resolution supportprocess: Process spawning and managementquinn: Quinn QUIC protocol supporttokio-io: Tokio I/O trait compatibilitydns-over-quic: DNS over QUIC (RFC 9250)dns-over-h3: DNS over HTTP/3dns-over-https-rustls: DNS over HTTPS with rustlsdns-over-rustls: DNS over TLS with rustlsdns-over-openssl: DNS over TLS with OpenSSLdns-over-native-tls: DNS over TLS with native-tlsdns-webpki-roots: Use webpki root certificatesdns-native-certs: Use OS native certificatesdnssec: Basic DNSSEC supportdnssec-openssl: DNSSEC with OpenSSLdnssec-ring: DNSSEC with ring crypto library| Feature | agnostic | agnostic-lite |
|---|---|---|
| Task spawning | ✅ | ✅ |
| Time operations | ✅ | ✅ |
| Networking | ✅ | ❌ |
| DNS resolution | ✅ | ❌ |
| Process management | ✅ | ❌ |
| QUIC support | ✅ | ❌ |
no_std support |
❌ | ✅ |
| Alloc-free | ❌ | ✅ |
| No unsafe code | ❌ | ✅ |
Use agnostic-lite when:
no_std or embedded supportUse agnostic when:
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.