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

```rust

![no_std]

use acid_io::{ byteorder::{BE, LE, ReadBytesExt, WriteBytesExt}, Cursor, Read, Seek, SeekFrom, Write, };

let mut buf = [0u8; 10]; let mut curs = Cursor::new(&mut buf);

curs.writeu8(1)?; curs.writeu16::(2)?; curs.write_u32::(3)?;

curs.seek(SeekFrom::Start(0))?;

asserteq!(curs.readu8()?, 1); asserteq!(curs.readu16::()?, 2); asserteq!(curs.readu32::()?, 3); ```

Feature flags

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

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.