[workspace]
members = ["dtact-io", "dtact-macros", "fuzz", "web"]

[package]
name = "dtact"
version = "0.2.5"
edition = "2024"

authors = ["Xinyu Yang <xinyu.yang@apich.org>"]
exclude = ['benchmark_results.md', 'web/*']
publish = true
repository = "https://github.com/Apich-Organization/dtact"
documentation = "https://docs.rs/dtact"
readme = "./README.md"
categories = ["asynchronous", "concurrency"]
keywords = ["async", "futures", "non-blocking", "runtime", "concurrency"]
license = "MIT or Apache-2.0"
description = "Dtact: A non-preemptive, stackful coroutine runtime featuring a lock-free context arena, P2P mesh scheduling, and architecture-specific assembly switchers. Designed for hardware-level control and non-blocking heterogeneous orchestration."
rust-version = "1.90.0"

[dependencies]
dtact-macros = { path = "./dtact-macros", version = "0.1" }
libc = "0.2"

[target.'cfg(loom)'.dependencies]
loom = "0.7"

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.61", features = [
    "Win32_System_Diagnostics",
    "Win32_System_Memory",
    "Win32_System_Threading",
    "Win32_System_Diagnostics_Debug",
    "Win32_System_SystemInformation",
] }

[dev-dependencies]
loom = "0.7"
proptest = "1.6"
criterion = { version = "0.8", features = ["async_tokio"] }
tokio = { version = "1.52", features = ["full"] }
serial_test = "3.0"
dtact-io = { path = "./dtact-io", version = "0.1" }

[build-dependencies]
cbindgen = "0.29"

[profile.bench]
lto = true
codegen-units = 1
opt-level = 3
strip = true
debug = false
debug-assertions = false
overflow-checks = false
incremental = true

[profile.release]
lto = true
codegen-units = 1
panic = "abort"
opt-level = 3
strip = true
debug = false
debug-assertions = false
overflow-checks = false
incremental = true

[profile.release.package.dtact-web]
opt-level = 'z'
codegen-units = 1

[profile.release.package.dtact-fuzz]
strip = false
debug = true

[profile.dev]
lto = false
opt-level = 0
debug = true

[features]
default = []
hw-acceleration = []
hypervisor = []
windows-root = []
security-hardened = []
kernel = []

[lib]
crate-type = ["cdylib", "rlib", "staticlib"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
dtact-macros = { path = "dtact-macros" }

[[bench]]
name = "scheduler_efficiency"
harness = false

[[bench]]
name = "io_performance"
harness = false
