]> git.lizzy.rs Git - connect-rs.git/blob - README.md
remove dependency on protobuf and introduce basic custom wire format
[connect-rs.git] / README.md
1 # connect-rs
2
3 [![Crates.io][crates-badge]][crates-url]
4 [![Docs.rs][docs-badge]][docs-url]
5
6 [crates-badge]: https://img.shields.io/crates/v/connect.svg
7 [crates-url]: https://crates.io/crates/connect
8 [docs-badge]: https://docs.rs/connect/badge.svg
9 [docs-url]: https://docs.rs/connect
10
11 This Rust crate provides a simple brokerless message-queue abstraction over asynchronous network
12 streams.
13
14 ## Why?
15 When building networked applications, developers shouldn't have to focus on repeatedly solving
16 the problem of reliable, fault-tolerant message delivery over byte-streams. By using a message
17 queue abstraction, crate users can focus on core application logic and leave the low-level
18 networking and message-queue guarantees to the abstraction.
19
20 ## Examples
21 Please use the [examples](https://github.com/sachanganesh/connect-rs/tree/main/examples)
22 provided to help understand crate usage.
23
24 ## Protobuf
25 This crate relies on the use of [Protocol Buffers](https://developers.google.com/protocol-buffers)
26 due to it being widely adopted and industry-proven. All messages are Protobuf messages that
27 are packed into a Protobuf `Any` type and then sent over the wire. Message recipients must
28 decide what Protobuf message type it is, and correspondingly unpack the `Any` into a particular
29 message type.
30
31 Protobuf was chosen when the library hit a roadblock with Rust's `TypeId` potentially not being
32 consistent between Rust compiler versions. The crate requires a consistent way to determine what
33 type of message is received, so it can appropriately deserialize the message from network bytes.
34 Until the Rust ecosystem around reflection improves, the crate will use Protobuf to fill the
35 void.
36
37 ## Feature Status
38
39 | Feature                                               | Status        |
40 |-----------------------------------------------------  |--------       |
41 | [TCP Client](examples/tcp-client)                         |    ✓    |
42 | [TCP Server](examples/tcp-echo-server)                    |    ✓    |
43 | [TLS Client](examples/tls-client)                         |    ✓    |
44 | [TLS Server](examples/tls-echo-server)                    |    ✓    |
45 | SCTP Client                                           |               |
46 | SCTP Server                                           |               |
47 | DTLS-SCTP Client                                      |               |
48 | DTLS-SCTP Server                                      |               |