87 releases

Uses new Rust 2024

new 0.26.15 May 2, 2026
0.26.14 Mar 24, 2026
0.26.12 Feb 22, 2026
0.26.8 Dec 24, 2025
0.7.0 Mar 8, 2021

#187 in WebSocket

MIT license

190KB
3.5K SLoC

crates.io badge docs.rs badge

This is async-proto, a library crate facilitating simple binary network protocols with async support.

For a list of available Cargo features, see the crate-level documentation.


lib.rs:

This is async-proto, a library crate facilitating simple binary network protocols with async support.

The main feature is the Protocol trait, which allows reading a value of an implementing type from an async or sync stream, as well as writing one to an async or sync sink.

Protocol can be derived for enums and structs if all fields implement Protocol.

Features

This crate offers optional dependencies on the following crates to enable Protocol implementations for some of their types:

Additionally, this crate offers optional dependencies on the tokio-tungstenite crate to add convenience methods for reading/writing Protocol types from/to its websockets. The following versions are supported:

Dependencies

~3–15MB
~245K SLoC