acid_io
A pared-down version of Rust's std::io usable in no_std contexts.
Rust's std::io provides common interfaces that are used widely in the Rust
ecosystem for reading and writing data. However, as of 2022, these interfaces
are not available in no_std builds.
This crate provides drop-in replacements for the types and traits exposed by
std::io which can be used with no_std.
Example
use ;
let mut buf = ;
let mut curs = new;
curs.write_u8?;
curs.?;
curs.?;
curs.seek?;
assert_eq!;
assert_eq!;
assert_eq!;
Feature flags
-
stdReplaces all items with re-exports of their counterparts in
std::io. This effectively makesacid_ioan alias ofstd::io, but missing any items thatacid_iowouldn't otherwise provide. -
allocExposes
BufReaderandBufWriter, as well as those trait methods which take or returnVecorString. -
byteorderExposes
acid_io::byteorder, which contains implementations ofReadBytesExtandWriteBytesExtforacid_io'sReadandWritetraits. Also re-exports the rest ofbyteorder.
Acknowledgments
Much of this library is copied verbatim or with slight modifications from other Rust projects:
If you find this crate useful, please consider sponsoring members of the Library team on GitHub.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.