#![doc = include_str!("../README.md")]
#![cfg_attr(not(feature = "std"), no_std)]
#![deny(warnings, missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(docsrs, allow(unused_attributes))]
#![allow(clippy::needless_return)]
#![allow(unreachable_code)]
#[cfg(all(feature = "alloc", not(feature = "std")))]
extern crate alloc as std;
#[cfg(feature = "std")]
extern crate std;
pub use runtime::*;
mod runtime {
pub use agnostic_lite::{
AfterHandle, AfterHandleError, AsyncAfterSpawner, AsyncBlockingSpawner, AsyncLocalSpawner,
AsyncSpawner, JoinHandle, LocalJoinHandle, RuntimeLite, Yielder, cfg_linux, cfg_smol,
cfg_tokio, cfg_unix, cfg_windows, time,
};
pub trait Runtime: RuntimeLite {
#[cfg(feature = "net")]
#[cfg_attr(docsrs, doc(cfg(feature = "net")))]
type Net: super::net::Net;
#[cfg(feature = "process")]
#[cfg_attr(docsrs, doc(cfg(feature = "process")))]
type Process: super::process::Process;
#[cfg(feature = "quinn")]
#[cfg_attr(docsrs, doc(cfg(feature = "quinn")))]
type Quinn: super::quinn::QuinnRuntime;
#[cfg(feature = "quinn")]
#[cfg_attr(docsrs, doc(cfg(feature = "quinn")))]
fn quinn() -> Self::Quinn;
}
}
pub use agnostic_io as io;
#[cfg(feature = "tokio")]
#[cfg_attr(docsrs, doc(cfg(feature = "tokio")))]
pub mod tokio;
#[cfg(feature = "smol")]
#[cfg_attr(docsrs, doc(cfg(feature = "smol")))]
pub mod smol;
#[cfg(feature = "net")]
#[cfg_attr(docsrs, doc(cfg(feature = "net")))]
pub mod net;
#[cfg(feature = "dns")]
#[cfg_attr(docsrs, doc(cfg(feature = "dns")))]
pub mod dns {
pub use agnostic_dns::{
AgnosticTime, AsyncConnectionProvider, AsyncDnsUdp, AsyncRuntimeProvider, AsyncSpawn,
CLOUDFLARE, Dns, GOOGLE, LookupIpStrategy, NameServerConfig, ProtocolConfig, QUAD9,
ResolverConfig, ResolverOpts, ServerGroup, ServerOrderingStrategy, Timer,
};
#[cfg(any(unix, windows))]
#[cfg_attr(docsrs, doc(cfg(any(unix, windows))))]
pub use agnostic_dns::read_system_conf;
#[cfg(all(unix, not(target_os = "android"), not(target_vendor = "apple")))]
#[cfg_attr(
docsrs,
doc(cfg(all(unix, not(target_os = "android"), not(target_vendor = "apple"))))
)]
pub use agnostic_dns::{parse_resolv_conf, read_resolv_conf};
}
#[cfg(feature = "quinn")]
#[cfg_attr(docsrs, doc(cfg(feature = "quinn")))]
pub mod quinn;
#[cfg(feature = "process")]
#[cfg_attr(docsrs, doc(cfg(feature = "process")))]
pub mod process;