The default crate (no features) must compile to wasm32-unknown-unknown so the downstream TS/Python adapter story works — a wasm-compiled alktty is the protocol layer for a sandboxed adapter. The local feature is inherently non-wasm (portable-pty + tokio::process need a real OS) and enabling it on wasm is a build error by design. Cargo.toml: - tokio: drop features = ["full"], use the wasm-clean subset alkcall uses (rt, sync, io-util, macros) with default-features = false - local feature adds tokio/process + tokio/rt-multi-thread - document the wasm constraint in the [features] comment Plan: - Decision 1: add WASM target subsection recording the constraint - Phase 0: mark the tokio feature split as done - Risks: add WASM-target-regression risk with a cargo-check CI mitigation
54 lines
1.9 KiB
TOML
54 lines
1.9 KiB
TOML
[package]
|
|
name = "alktty"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
rust-version = "1.85"
|
|
license = "MIT OR Apache-2.0"
|
|
description = "Terminal session protocol: wire format, TtyBackend trait, TtyAdapter, and typed consumer client. Producer/consumer protocol crate on top of alkcall channels."
|
|
repository = "https://git.alk.dev/alkdev/alktty"
|
|
keywords = ["tty", "terminal", "pty", "channels", "alkcall"]
|
|
categories = ["network-programming", "asynchronous"]
|
|
exclude = [".opencode/", "docs/reviews/", "docs/research/", "docs/sdd_process.md", "Cargo.lock"]
|
|
|
|
[lib]
|
|
name = "alktty"
|
|
|
|
[features]
|
|
default = []
|
|
# `local` is inherently non-wasm (portable-pty + tokio::process need a real
|
|
# OS). The default crate (no features) targets `wasm32-unknown-unknown`;
|
|
# enabling `local` on wasm is a build error by design — use a real OS for
|
|
# the local-process backend. The protocol crate (wire, negotiation,
|
|
# control, backend trait, adapter, session, channels) stays wasm-clean so
|
|
# downstream TS/Python adapters can compile it in a sandbox.
|
|
local = ["dep:portable-pty", "dep:tokio-util", "tokio/process", "tokio/rt-multi-thread"]
|
|
|
|
[dependencies]
|
|
alkcall = "0.1.1"
|
|
# Minimal, wasm-clean tokio features. `local` adds `process` +
|
|
# `rt-multi-thread` (non-wasm). Do NOT use `features = ["full"]` — it
|
|
# pulls in `signal`/`fs`/`net` which break `wasm32-unknown-unknown`.
|
|
tokio = { version = "1", default-features = false, features = ["rt", "sync", "io-util", "macros"] }
|
|
bytes = "1"
|
|
futures = "0.3"
|
|
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"
|
|
|
|
portable-pty = { version = "0.9", optional = true }
|
|
tokio-util = { version = "0.7", features = ["io"], optional = true }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
libc = "0.2"
|
|
|
|
[dev-dependencies]
|
|
tokio = { version = "1", features = ["full", "test-util", "macros"] }
|
|
tokio-stream = "0.1"
|
|
serde_json = "1"
|
|
tempfile = "3"
|
|
bytes = "1"
|