1 unstable release
0.1.0 | Nov 22, 2022 |
---|
#23 in #bincode
8KB
125 lines
tokio-bincodec
A fork of tokio-bincode
Usage
First, add this to your Cargo.toml
:
[dependencies]
tokio-bincodec = "0.1"
Then you can use it like so:
#[derive(Serialize, Deserialize)]
struct MyProtocol;
// Create the codec based on your custom protocol
let codec = tokio_bincodec::bincodec::<MyProtocol>();
// Frame the transport with the codec to produce a stream/sink
let f = Framed::new(transport, codec);
License
This project is licensed under the MIT license.
Dependencies
~2.8–4MB
~68K SLoC