#tcp-stream #protobuf #tcp #serialization #performance #tcp-connection #service

protosocket-prost

Message-oriented nonblocking tcp stream - protocol buffers bindings

19 releases (4 breaking)

0.5.4 Aug 11, 2024
0.5.3 Aug 7, 2024
0.4.6 Aug 5, 2024
0.3.1 Aug 3, 2024
0.1.5 Jul 30, 2024

#1370 in Web programming

Download history 493/week @ 2024-07-28 1008/week @ 2024-08-04 413/week @ 2024-08-11 150/week @ 2024-08-18 229/week @ 2024-08-25 200/week @ 2024-09-01 81/week @ 2024-09-08

673 downloads per month
Used in rmemstore

Apache-2.0

40KB
640 lines

protosocket

Tools for building message-oriented tcp streams.

A protosocket is a non-blocking, bidirectional, message streaming connection. Providing a serializer and deserializer for your messages, you can stream to and from tcp servers.

Protosockets avoid too many opinions - you have (get?) to choose your own message ordering and concurrency semantics. You can make an implicitly ordered stream, or a non-blocking out-of-order stream, or anything in between.

Tools to facilitate protocol buffers over tcp are provided in protosocket-prost. You can see the protocol buffers example in example-proto. If you're only using rust, of course you can hand-write prost structs, but if you want to use a protosocket server with clients in other languages you'll want to generate from protos.


lib.rs:

Conveniences for using protocol buffers via prost with protosocket.

See the example-proto directory for a complete example of how to use this crate.

Dependencies

~4–12MB
~133K SLoC