packetio

Crates.iopacketio
lib.rspacketio
version0.2.1
created_at2025-07-08 20:15:12.205658+00
updated_at2025-08-26 00:40:40.615977+00
descriptionA simple Rust crate for sending and receiving length-prefixed binary packets over any stream.
homepage
repository
max_upload_size
id1743472
size19,278
(gaelgnz)

documentation

https://docs.rs/packetio

README

packetio

Crates.io Size

A simple Rust crate for sending and receiving length-prefixed binary packets over any stream that implements Read or Write. Uses bincode for serialization.

It lets you send structs and rust types over the network!


Features

  • Sends and receives length-prefixed packets to keep boundaries clear
  • Generic over any stream implementing Read or Write)(TcpStream, BufReader, etc.)
  • Minimal API with a handy PacketSender and PacketReceiver traits for easy use
  • Uses bincode for compact, efficient binary encoding
  • Lightweight and just straight forward!

Installation

Add this to your Cargo.toml:

[dependencies]
packetio = "0.1"
bincode = "2"
Commit count: 0

cargo fmt