proxima-runtime 0.1.0

Runtime trait abstraction for proxima: per-core spawn, cross-core dispatch, background pool
Documentation
[package]
name = "proxima-runtime"
description = "Runtime trait abstraction for proxima: per-core spawn, cross-core dispatch, background pool"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
readme = "README.md"

[features]
default = ["std"]
std = ["alloc", "proxima-core/std", "thiserror/std"]
alloc = ["proxima-core/alloc"]
# no-op locally as of Wave D Phase 1 (SpanId de-embedded from SpawnRequest —
# trace-span context now travels via `telemetry::Spanned<T>`, not a field on
# this enum). Kept declared because the root workspace Cargo.toml and prime
# still forward into `proxima-runtime/runtime-prime-full`; removing the
# feature here would break their feature unification. Empty, like the sibling
# `proxima-primitives/runtime-prime-full`: forwarding into `proxima` (a
# dev-dependency of this crate, and the crate that forwards back into here)
# made the edge a cycle that pulled the whole umbrella in to gate nothing.
runtime-prime-full = []
rayon = ["dep:rayon", "dep:futures", "std"]
# Adaptive per-core concurrency control (Concurrency knob + strategy controller).
# Default-off firewall: downstream opts in. Needs std (Instant timing in the
# driver, f64::sqrt in the multiplicative law) plus the config projection deps.
concurrency = ["std", "dep:serde", "dep:conflaguration"]
# The default `Runtime` impl: N tokio current-thread runtimes pinned one per
# CPU core (folded from the former proxima-runtime-tokio crate — FOLD 1 of the
# runtime backend consolidation). Enables the `tokio` module (`TokioPerCoreRuntime`
# + the `*Like` primitive adapters). The base crate stays no_std + alloc;
# tokio itself only enters the dependency graph behind this feature.
tokio = ["std", "dep:tokio", "dep:core_affinity", "dep:flume"]
# `io-uring` swaps epoll for io_uring on Linux under the tokio backend —
# `tokio_uring::start` drives the per-core worker instead of a plain
# current-thread tokio runtime. Composes with `tokio`; macOS/Windows builds
# accept the flag but fall back to the tokio current-thread runtime (no
# `tokio-uring` dep outside `cfg(target_os = "linux")`).
io-uring = ["tokio", "dep:tokio-uring"]

[dependencies]
proxima-core = { workspace = true, default-features = false }
futures = { workspace = true, optional = true, default-features = false, features = ["alloc"] }
rayon        = { workspace = true, optional = true }
serde = { workspace = true, features = ["derive"], optional = true }
conflaguration = { workspace = true, features = ["derive", "toml"], optional = true }
tokio = { workspace = true, features = ["rt", "rt-multi-thread", "macros", "time", "sync", "net"], optional = true }
core_affinity = { workspace = true, optional = true }
flume = { workspace = true, optional = true }
thiserror.workspace = true

[[bench]]
name = "bench_runtime_dispatch"
harness = false
required-features = ["std"]

[[bench]]
name = "bench_concurrency"
harness = false
required-features = ["concurrency"]

[[test]]
name = "foreign_strategy"
required-features = ["concurrency"]

[dev-dependencies]
proxima = { package = "proxima-lib", path = "..", features = ["test-support-tokio"] }
criterion = { workspace = true }
toml.workspace = true
temp-env.workspace = true

[lints]
workspace = true

[target.'cfg(target_os = "linux")'.dependencies]
tokio-uring = { workspace = true, optional = true }