Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util: add futures-io/tokio::io compatibility layer #2117

Merged
merged 5 commits into from
Jan 29, 2020
Merged

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Jan 14, 2020

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:
tokio-rs/tokio-compat#2 (comment)

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:
Nemo157/futures-tokio-compat#2 (comment)

Closes tokio-rs/tokio-compat#2

Co-authored-by: Wim Looman wim@nemo157.com
Signed-off-by: Eliza Weisman eliza@buoyant.io

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:
tokio-rs/tokio-compat#2 (comment)

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:
Nemo157/futures-tokio-compat#2 (comment)

Closes tokio-rs/tokio-compat#2

Co-authored-by: Wim Looman <wim@nemo157.com>
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
@hawkw hawkw added the C-enhancement Category: A PR with an enhancement or bugfix. label Jan 14, 2020
@hawkw hawkw self-assigned this Jan 14, 2020
tokio-util/src/compat.rs Show resolved Hide resolved
tokio-util/src/compat.rs Show resolved Hide resolved
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
tokio-util/src/compat.rs Outdated Show resolved Hide resolved
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
@hawkw hawkw merged commit be832f2 into master Jan 29, 2020
@hawkw hawkw deleted the eliza/compat-utils branch January 29, 2020 19:14
@dtantsur
Copy link

Hi folks! Any plans for a new tokio-util release with this feature?

@LucioFranco
Copy link
Member

@dtantsur hopefully this week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: A PR with an enhancement or bugfix.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants