tokio-rs / bytes

Utilities for working with bytes
MIT License
1.91k stars 288 forks source link

Provide `put_ne` and `get_ne` implementations for native endianness #549

Closed lehmanju closed 1 year ago

lehmanju commented 2 years ago

Thank you for providing this crate. The API is really intuitive, however, for some projects there is a feature I am missing: support for native endianness.

Right now Buf and BufMut provide put and get functions for big and little endianness. But some protocols, like wayland, rely on native endianness. This makes parsing and serialization difficult with bytes.