forked from mirror/async-std
Put everything behind a 'stable' feature
This commit is contained in:
parent
87de4e1598
commit
dcd7c55cef
3 changed files with 43 additions and 30 deletions
|
@ -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"
|
||||
|
|
69
src/lib.rs
69
src/lib.rs
|
@ -49,33 +49,46 @@
|
|||
#![doc(html_logo_url = "https://async.rs/images/logo--hero.svg")]
|
||||
#![recursion_limit = "2048"]
|
||||
|
||||
#[macro_use]
|
||||
mod utils;
|
||||
|
||||
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_unstable! {
|
||||
pub mod pin;
|
||||
pub mod process;
|
||||
|
||||
mod unit;
|
||||
mod vec;
|
||||
mod result;
|
||||
mod option;
|
||||
mod string;
|
||||
mod collections;
|
||||
|
||||
#[doc(inline)]
|
||||
pub use std::{write, writeln};
|
||||
/// Declares stable items.
|
||||
#[doc(hidden)]
|
||||
macro_rules! cfg_stable {
|
||||
($($item:item)*) => {
|
||||
$(
|
||||
#[cfg(feature = "stable")]
|
||||
$item
|
||||
)*
|
||||
}
|
||||
}
|
||||
|
||||
mod macros;
|
||||
cfg_stable! {
|
||||
#[macro_use]
|
||||
mod utils;
|
||||
|
||||
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_unstable! {
|
||||
pub mod pin;
|
||||
pub mod process;
|
||||
|
||||
mod unit;
|
||||
mod vec;
|
||||
mod result;
|
||||
mod option;
|
||||
mod string;
|
||||
mod collections;
|
||||
|
||||
#[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…
Reference in a new issue