ADR-054 prescribes with a re-export module, but cargo rejects the cyclic dependency (alknet-tty → alknet-tty-local → alknet-tty) even with an optional dep. The re-export is deferred to the assembly layer: consumers depend on alknet-tty-local directly and register LocalTtyBackend in the TtyAdapter backend map. The feature gate stays declared (empty) for forward compatibility. Assembly pattern documented in the crate root doc comment.
36 lines
1.1 KiB
TOML
36 lines
1.1 KiB
TOML
[package]
|
|
name = "alknet-tty"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "Terminal session protocol handler for the `alknet/tty` ALPN: wire format, TtyBackend trait, and TtyAdapter (ProtocolHandler)"
|
|
repository.workspace = true
|
|
|
|
[lib]
|
|
name = "alknet_tty"
|
|
|
|
[features]
|
|
default = []
|
|
# ADR-054 prescribes `local = ["dep:alknet-tty-local"]` with a re-export in
|
|
# `src/lib.rs`. Cargo rejects the cyclic dependency (alknet-tty →
|
|
# alknet-tty-local → alknet-tty) even with an optional dep, so the
|
|
# re-export is deferred to the assembly layer: a consumer that wants the
|
|
# local backend depends on `alknet-tty-local` directly and registers
|
|
# `LocalTtyBackend` in the `TtyAdapter` backend map. See ADR-054 §"The
|
|
# feature-re-export compromise" and the deviation note in `src/lib.rs`.
|
|
local = []
|
|
|
|
[dependencies]
|
|
alknet-core = { path = "../alknet-core" }
|
|
tokio = { version = "1", features = ["full"] }
|
|
bytes = "1"
|
|
futures-core = "0.3"
|
|
tokio-stream = "0.1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
async-trait = "0.1"
|
|
tracing = "0.1"
|
|
thiserror = "2"
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
libc = "0.2" |