mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-01-19 05:43:55 +01:00
eb882a69b6
We use `tokio`'s `io-util` feature to provide the `Async{Read,Write}Ext` traits, which allow us to simply launch a read future or `poll_write` directly as well as `split` the `TcpStream` into a read/write half. However, these traits aren't actually doing much for us - they are really just wrapping the `readable` future (which we can trivially use ourselves) and `poll_write` isn't doing anything for us that `poll_write_ready` can't. Similarly, the split logic is actually just `Arc`ing the `TcpStream` and busy-waiting when an operation is busy to prevent concurrent reads/writes. However, there's no reason to prevent concurrent access at the stream level - we aren't ever concurrently writing or reading (though we may concurrently read and write, which is fine). Worse, the `io-util` feature broke MSRV (though they're likely to fix this upstream) and carries two additional dependencies (only one on the latest upstream tokio). Thus, we simply drop the dependency here. Fixes #2527.
25 lines
947 B
TOML
25 lines
947 B
TOML
[package]
|
|
name = "lightning-net-tokio"
|
|
version = "0.0.116"
|
|
authors = ["Matt Corallo"]
|
|
license = "MIT OR Apache-2.0"
|
|
repository = "https://github.com/lightningdevkit/rust-lightning/"
|
|
description = """
|
|
Implementation of the rust-lightning network stack using Tokio.
|
|
For Rust-Lightning clients which wish to make direct connections to Lightning P2P nodes, this is a simple alternative to implementing the required network stack, especially for those already using Tokio.
|
|
"""
|
|
edition = "2018"
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
|
|
|
[dependencies]
|
|
bitcoin = "0.29.0"
|
|
lightning = { version = "0.0.116", path = "../lightning" }
|
|
tokio = { version = "1.0", features = [ "rt", "sync", "net", "time" ] }
|
|
|
|
[dev-dependencies]
|
|
tokio = { version = "1.14", features = [ "macros", "rt", "rt-multi-thread", "sync", "net", "time" ] }
|
|
lightning = { version = "0.0.116", path = "../lightning", features = ["_test_utils"] }
|