diff --git a/futures/Cargo.toml b/futures/Cargo.toml index edf4a53853..038da9fc41 100644 --- a/futures/Cargo.toml +++ b/futures/Cargo.toml @@ -36,3 +36,4 @@ futures-util-preview = { path = "../futures-util", version = "0.3.0-alpha.1", de nightly = ["futures-util-preview/nightly"] std = ["futures-core-preview/std", "futures-executor-preview/std", "futures-io-preview/std", "futures-sink-preview/std", "futures-util-preview/std"] default = ["std"] +compat = ["std", "futures-util-preview/compat"] diff --git a/futures/src/lib.rs b/futures/src/lib.rs index c38afe54d6..47d8d6f854 100644 --- a/futures/src/lib.rs +++ b/futures/src/lib.rs @@ -79,6 +79,19 @@ pub mod channel { pub use futures_channel::{oneshot, mpsc}; } +#[cfg(feature = "compat")] +pub mod compat { + //! Interop between `futures` 0.1 and 0.3. + //! + + pub use futures_util::compat::{ + Compat, CompatExecutor, + ExecutorFuture01, + Executor01CompatExt, + Future01Ext, + }; +} + #[cfg(feature = "std")] pub mod executor { //! Task execution.