mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00

* util: add futures-io/tokio::io compatibility layer This PR adds a compatibility layer with conversions between the `tokio::io` and `futures-io` versions of the `AsyncRead` and `AsyncWrite` traits. I initially opened this PR against `tokio-compat`, but we decided that a compatibility layer for current versions of the `tokio` and `futures-io` crates (rather than for compatibility with legacy code) ought to go in `tokio-util` instead. See: https://github.com/tokio-rs/tokio-compat/pull/2#issuecomment-551310953 This is based on code originally written by @Nemo157 as part of the `futures-tokio-compat` crate, and is contributed on behalf of the original author: https://github.com/Nemo157/futures-tokio-compat/issues/2#issuecomment-544118866 Closes tokio-rs/tokio-compat#2 Co-authored-by: Wim Looman <wim@nemo157.com> Signed-off-by: Eliza Weisman <eliza@buoyant.io>
52 lines
1.2 KiB
TOML
52 lines
1.2 KiB
TOML
[package]
|
|
name = "tokio-util"
|
|
# When releasing to crates.io:
|
|
# - Remove path dependencies
|
|
# - Update html_root_url.
|
|
# - Update doc url
|
|
# - Cargo.toml
|
|
# - Update CHANGELOG.md.
|
|
# - Create "v0.2.x" git tag.
|
|
version = "0.2.0"
|
|
edition = "2018"
|
|
authors = ["Tokio Contributors <team@tokio.rs>"]
|
|
license = "MIT"
|
|
repository = "https://github.com/tokio-rs/tokio"
|
|
homepage = "https://tokio.rs"
|
|
documentation = "https://docs.rs/tokio-util/0.2.0/tokio_util"
|
|
description = """
|
|
Additional utilities for working with Tokio.
|
|
"""
|
|
categories = ["asynchronous"]
|
|
|
|
[features]
|
|
# No features on by default
|
|
default = []
|
|
|
|
# Shorthand for enabling everything
|
|
full = ["codec", "udp", "compat"]
|
|
|
|
compat = ["futures-io",]
|
|
codec = ["tokio/stream"]
|
|
udp = ["tokio/udp"]
|
|
|
|
[dependencies]
|
|
tokio = { version = "0.2.0", path = "../tokio" }
|
|
|
|
bytes = "0.5.0"
|
|
futures-core = "0.3.0"
|
|
futures-sink = "0.3.0"
|
|
futures-io = { version = "0.3.0", optional = true }
|
|
log = "0.4"
|
|
pin-project-lite = "0.1.1"
|
|
|
|
[dev-dependencies]
|
|
tokio = { version = "0.2.0", path = "../tokio", features = ["full"] }
|
|
tokio-test = { version = "0.2.0", path = "../tokio-test" }
|
|
|
|
futures = "0.3.0"
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
rustdoc-args = ["--cfg", "docsrs"]
|