[package] name = "tokio-yamux" version = "0.3.9" license = "MIT" repository = "https://github.com/nervosnetwork/tentacle" description = "Rust implementation of Yamux" authors = [ "Linfeng Qian ", "Nervos Core Dev ", ] edition = "2021" [dependencies] bytes = "1.0.0" futures = { version = "0.3.0" } tokio = { version = "1.0.0" } tokio-util = { version = "0.7.0", features = ["codec"] } log = "0.4" nohash-hasher = "0.2" futures-timer = { version = "3.0.2", optional = true } [target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] web-time = "1.1.0" [dev-dependencies] env_logger = "0.6" rand = "0.8" bytesize = "1" tokio = { version = "1.0.0", features = [ "time", "net", "io-util", "rt", "rt-multi-thread", ] } [features] default = ["tokio-timer"] # use tokio timer tokio-timer = ["tokio/time"] # generic timer, this means that yamux can run under any runtime # the difference of `AsyncRead/AsyncWrite` can be converted by `tokio-util` generic-timer = ["futures-timer"] # use futures-timer's wasm feature wasm = ["generic-timer", "futures-timer/wasm-bindgen"]