futures-byteorder 0.1.0

A modern async byteorder library for the smol/futures-lite ecosystem
Documentation
<div align="center">
    <h1>🧮 <code>futures-byteorder</code></h1>
    <a href="https://crates.io/crates/futures-byteorder">
        <img alt="Crates.io" src="https://img.shields.io/crates/v/futures-byteorder.svg" />
    </a>
    <a href="https://docs.rs/futures-byteorder">
        <img alt="Documentation" src="https://docs.rs/futures-byteorder/badge.svg" />
    </a>
    <a href="https://www.rust-lang.org">
        <img alt="MSRV: 1.87" src="https://img.shields.io/badge/rust-1.87%2B-blue.svg" />
    </a>
</div>

A modern async byteorder library for the smol/futures-lite ecosystem.

This crate provides utilities for reading and writing numbers in big-endian and little-endian byte
order for async I/O streams. It's designed as a lightweight alternative to `byteorder` with
first-class async support and zero proc-macro dependencies

## Quick start

```toml
[dependencies]
futures-byteorder = "0.1"
```

### Reading

```rust
use futures_byteorder::{AsyncReadBytes, BE};
use futures_lite::io::Cursor;

let data = vec![0x12, 0x34, 0x56, 0x78];
let mut reader = AsyncReadBytes::new(&mut Cursor::new(data));

// Read a big-endian u16
let value = reader.read_u16::().await?;
assert_eq!(value, 0x1234);

// Read using native endianness
let value = reader.read_u16_ne().await?;
```

### Writing

```rust
use futures_byteorder::{AsyncWriteBytes, LE};
use futures_lite::io::Cursor;

let mut buffer = Vec::new();
let mut writer = AsyncWriteBytes::new(&mut Cursor::new(&mut buffer));

writer.write_u32::(0x12345678).await?;
writer.write_u16_ne(0xABCD).await?;
```

## Endianness types

- `BigEndian` (`BE`) - Network byte order
- `LittleEndian` (`LE`) - x86 byte order
- `NativeEndian` (`NE`) - Platform native
- `NetworkEndian` - Alias for `BE`

## Supported types

All primitive numeric types: `u8`-`u128`, `i8`-`i128`, `f32`, `f64`

## Why futures-byteorder?

The original `byteorder` crate is excellent, but predates async/await. This crate provides:

- Native async support with `futures-lite`
- Designed for the smol ecosystem
- Zero proc-macro dependencies (lightweight!)
- Modern, clean API built for async from the ground up

## License

Licensed under either of

- Apache License, Version 2.0, ([LICENSE-APACHE]LICENSE-APACHE or
  <https://www.apache.org/licenses/LICENSE-2.0>)
- MIT license ([LICENSE-MIT]LICENSE-MIT or <https://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.