Put everything behind a 'stable' feature

pull/434/head
Paulo 5 years ago
parent 87de4e1598
commit dcd7c55cef

@ -21,8 +21,10 @@ features = ["docs"]
rustdoc-args = ["--cfg", "feature=\"docs\""]
[features]
default = ["stable"]
docs = ["unstable"]
unstable = ["broadcaster"]
stable = []
[dependencies]
async-macros = "1.0.0"

@ -49,33 +49,46 @@
#![doc(html_logo_url = "https://async.rs/images/logo--hero.svg")]
#![recursion_limit = "2048"]
#[macro_use]
mod utils;
/// Declares stable items.
#[doc(hidden)]
macro_rules! cfg_stable {
($($item:item)*) => {
$(
#[cfg(feature = "stable")]
$item
)*
}
}
pub mod fs;
pub mod future;
pub mod io;
pub mod net;
pub mod os;
pub mod path;
pub mod prelude;
pub mod stream;
pub mod sync;
pub mod task;
cfg_stable! {
#[macro_use]
mod utils;
cfg_unstable! {
pub mod pin;
pub mod process;
pub mod fs;
pub mod future;
pub mod io;
pub mod net;
pub mod os;
pub mod path;
pub mod prelude;
pub mod stream;
pub mod sync;
pub mod task;
mod unit;
mod vec;
mod result;
mod option;
mod string;
mod collections;
cfg_unstable! {
pub mod pin;
pub mod process;
#[doc(inline)]
pub use std::{write, writeln};
}
mod unit;
mod vec;
mod result;
mod option;
mod string;
mod collections;
mod macros;
#[doc(inline)]
pub use std::{write, writeln};
}
mod macros;
}

@ -23,8 +23,6 @@ pub use crate::io::Seek as _;
pub use crate::io::Write as _;
#[doc(no_inline)]
pub use crate::stream::Stream;
#[doc(no_inline)]
pub use crate::task_local;
#[doc(hidden)]
pub use crate::future::future::FutureExt as _;

Loading…
Cancel
Save