mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-11 00:00:23 +02:00
Add no_std support, by adding an std feature (#281)
To make the library work as `no_std` we add an `std` feature which is on by default. When it is off, we compile as `no_std` and make parts of the API that require `std::io` conditional on the `std` feature.
This commit is contained in:
+7
-1
@@ -20,15 +20,21 @@ mod buf_impl;
|
||||
mod buf_mut;
|
||||
mod chain;
|
||||
mod iter;
|
||||
mod reader;
|
||||
mod take;
|
||||
mod vec_deque;
|
||||
|
||||
// When std::io::Reader etc. traits are not available, skip these
|
||||
#[cfg(feature = "std")]
|
||||
mod reader;
|
||||
#[cfg(feature = "std")]
|
||||
mod writer;
|
||||
|
||||
pub use self::buf_impl::Buf;
|
||||
pub use self::buf_mut::BufMut;
|
||||
pub use self::chain::Chain;
|
||||
pub use self::iter::IntoIter;
|
||||
#[cfg(feature = "std")]
|
||||
pub use self::reader::Reader;
|
||||
pub use self::take::Take;
|
||||
#[cfg(feature = "std")]
|
||||
pub use self::writer::Writer;
|
||||
|
||||
Reference in New Issue
Block a user