[package]
name = "async-rt"
version = "0.2.0"
edition = "2024"
rust-version = "1.95.0"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/dariusc93/async-rt"
readme = "README.md"
categories = ["asynchronous"]
keywords = ["async", "non-blocking", "futures"]
authors = ["Darius Clark"]
exclude = [".gitignore"]
description = """
A small library designed to utilize async executors through an common API while extending features.
"""
[workspace]
members = ["async-rt-macros", "examples/default-runtime"]
[features]
default = ["tokio", "lite", "macros"]
macros = ["dep:async-rt-macros"]
threadpool = ["futures/thread-pool"]
tokio = ["dep:tokio"]
compio = ["dep:compio"]
smol = ["dep:async-task", "dep:smol"]
lite = []
fs = [
"tokio?/fs",
"tokio?/io-util",
"compio?/fs",
"dep:js-sys",
"dep:wasm-bindgen",
"dep:web-sys",
]
net = [
"tokio?/net",
"tokio?/io-util",
"compio?/net",
"compio?/io-compat",
"dep:libc",
"dep:socket2",
]
[dependencies]
async-rt-macros = { version = "0.1.0", path = "async-rt-macros", optional = true }
futures = { version = "0.3.31", default-features = false, features = ["std", "alloc", "async-await"] }
pollable-map = "0.2.0"
futures-timeout = "0.2"
parking_lot = "0.12.5"
either = { version = "1.15.0", optional = true}
thiserror = "1.0.69"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1.49.0", optional = true, features = ["rt", "rt-multi-thread"] }
compio = { version = "0.19", optional = true, default-features = false, features = ["runtime"] }
async-task = { version = "4.7.1", optional = true }
smol = { version = "2.0.2", optional = true }
socket2 = { version = "0.6", optional = true }
libc = { version = "0.2", optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen-futures = "0.4.50"
js-sys = { version = "0.3.77", optional = true }
wasm-bindgen = { version = "0.2.100", optional = true }
web-sys = { version = "0.3.77", optional = true, features = [
"File",
"FileSystemCreateWritableOptions",
"FileSystemDirectoryHandle",
"FileSystemFileHandle",
"FileSystemGetDirectoryOptions",
"FileSystemGetFileOptions",
"FileSystemRemoveOptions",
"FileSystemWritableFileStream",
"StorageManager",
] }
[dev-dependencies]
futures-timer = "3.0.3"
tokio = { version = "1.49.0", features = ["rt", "rt-multi-thread", "macros"] }
compio = { version = "0.19", default-features = false, features = ["runtime", "macros"]}
futures = { version = "0.3.31", default-features = false, features = ["std", "alloc", "async-await", "thread-pool", "executor"] }