[package]
edition = "2024"
rust-version = "1.90.0"
name = "dtact-util"
version = "0.2.0"
authors = ["Xinyu Yang <xinyu.yang@apich.org>"]
build = "build.rs"
exclude = ["bench_results.md"]
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Async utilities for Dtact: I/O, filesystem, process, signal, stream and timer primitives with lock-free native (io_uring/IOCP/kqueue) and tokio backends. Designed for hardware-level control and non-blocking heterogeneous orchestration."
documentation = "https://docs.rs/dtact-util"
readme = "README.md"
keywords = [
"async",
"futures",
"non-blocking",
"runtime",
"concurrency",
]
categories = [
"asynchronous",
"concurrency",
]
license = "MIT or Apache-2.0"
repository = "https://github.com/Apich-Organization/dtact"
[features]
compat = [
"dep:tokio",
"dep:futures-io",
"dep:libc",
]
default = [
"native",
"dtact",
]
ffi = []
native = [
"dep:mio",
"dtact",
"dep:dtact-macros",
"dep:libc",
"dep:io-uring",
"dep:windows-sys",
]
spin = []
tokio = ["compat"]
[lib]
name = "dtact_util"
crate-type = [
"cdylib",
"rlib",
"staticlib",
]
path = "src/lib.rs"
[[test]]
name = "cancel_test"
path = "tests/cancel_test.rs"
[[test]]
name = "combinators_test"
path = "tests/combinators_test.rs"
[[test]]
name = "driver_test"
path = "tests/driver_test.rs"
[[test]]
name = "ffi_test"
path = "tests/ffi_test.rs"
required-features = ["ffi"]
[[test]]
name = "fs_test"
path = "tests/fs_test.rs"
[[test]]
name = "future_test"
path = "tests/future_test.rs"
[[test]]
name = "lookup_host_test"
path = "tests/lookup_host_test.rs"
[[test]]
name = "named_pipe_test"
path = "tests/named_pipe_test.rs"
[[test]]
name = "process_test"
path = "tests/process_test.rs"
[[test]]
name = "signal_test"
path = "tests/signal_test.rs"
[[test]]
name = "stream_test"
path = "tests/stream_test.rs"
[[test]]
name = "sync_test"
path = "tests/sync_test.rs"
[[test]]
name = "timer_test"
path = "tests/timer_test.rs"
[[test]]
name = "udp_test"
path = "tests/udp_test.rs"
[[test]]
name = "unix_socket_test"
path = "tests/unix_socket_test.rs"
[[bench]]
name = "fs_performance"
path = "benches/fs_performance.rs"
harness = false
required-features = ["native"]
[[bench]]
name = "io_performance"
path = "benches/io_performance.rs"
harness = false
required-features = ["native"]
[[bench]]
name = "named_pipe_performance"
path = "benches/named_pipe_performance.rs"
harness = false
required-features = ["native"]
[[bench]]
name = "process_performance"
path = "benches/process_performance.rs"
harness = false
required-features = ["native"]
[[bench]]
name = "signal_performance"
path = "benches/signal_performance.rs"
harness = false
required-features = ["native"]
[[bench]]
name = "stream_performance"
path = "benches/stream_performance.rs"
harness = false
required-features = ["native"]
[[bench]]
name = "sync_performance"
path = "benches/sync_performance.rs"
harness = false
[[bench]]
name = "tcp_roundtrip"
path = "benches/tcp_roundtrip.rs"
harness = false
required-features = ["native"]
[[bench]]
name = "timer_performance"
path = "benches/timer_performance.rs"
harness = false
required-features = ["native"]
[[bench]]
name = "udp_performance"
path = "benches/udp_performance.rs"
harness = false
required-features = ["native"]
[[bench]]
name = "unix_socket_roundtrip"
path = "benches/unix_socket_roundtrip.rs"
harness = false
required-features = ["native"]
[dependencies.dtact]
version = "0.2"
optional = true
[dependencies.dtact-macros]
version = "0.1"
optional = true
[dependencies.futures-io]
version = "0.3"
optional = true
[dependencies.libc]
version = "0.2"
optional = true
[dependencies.mio]
version = "1.2"
features = [
"os-poll",
"net",
]
optional = true
default-features = false
[dependencies.tokio]
version = "1.52"
features = [
"rt",
"rt-multi-thread",
"net",
"io-util",
"fs",
"time",
"signal",
"process",
]
optional = true
[dev-dependencies.criterion]
version = "0.8"
[dev-dependencies.libc]
version = "0.2"
[dev-dependencies.tokio]
version = "1.52"
features = ["full"]
[build-dependencies.cbindgen]
version = "0.29"
[target.'cfg(target_os = "linux")'.dependencies.io-uring]
version = "0.7"
features = ["direct-syscall"]
optional = true
[target."cfg(windows)".dependencies.windows-sys]
version = "0.61"
features = [
"Win32_Foundation",
"Win32_Networking_WinSock",
"Win32_System_IO",
"Win32_System_Threading",
"Win32_Storage_FileSystem",
"Win32_System_Console",
"Win32_System_Pipes",
]
optional = true