|
1 | 1 | # zmq.rs - A native Rust implementation of ZeroMQ
|
2 | 2 |
|
3 |
| -**DISCLAIMER: The codebase is very much a work in progress and feature incomplete. DO NOT USE IN PRODUCTION** |
| 3 | +**DISCLAIMER: This codebase does not implement all of ZeroMQ's feature set.** |
4 | 4 |
|
5 | 5 | ZeroMQ is a high-performance asynchronous messaging library that provides many popular messaging patterns for many transport types. They look and feel like Berkeley style sockets, but are fault tolerant and easier to use. This project aims to provide a native rust alternative to the [reference implementation](https://github.com/zeromq/libzmq), and leverage Rust's async ecosystem.
|
6 | 6 |
|
7 | 7 | ## Current status
|
8 |
| -A basic ZMTP implementation is working, but is not yet fully compliant to the spec. Integration tests against the reference implementation are also missing. External APIs are still subject to change - there are no semver or stability guarantees at the moment. |
| 8 | + |
| 9 | +Basic ZMTP implementation is working and tested against the reference implementation. |
9 | 10 |
|
10 | 11 | ### Supported transport types:
|
11 |
| -We plan to support most of the basic ZMQ sockets. The current list is as follows: |
| 12 | + |
12 | 13 | * TCP
|
13 | 14 | * IPC (unix only)
|
14 | 15 |
|
15 | 16 | ### Supported socket patterns:
|
16 |
| -We plan to support most of the basic ZMQ messaging patterns. The current list is as follows: |
| 17 | + |
17 | 18 | * Request/Response (REQ, REP, DEALER, ROUTER)
|
18 | 19 | * Publish/Subscribe (PUB, SUB)
|
19 | 20 | * Pipeline (PUSH, PULL)
|
20 | 21 |
|
21 | 22 | ## Usage
|
| 23 | + |
22 | 24 | See the [examples](examples) for some ways to get up and running quickly. You can also generate the documentation by doing `cargo doc --open` on the source code.
|
23 | 25 |
|
24 | 26 | ### Choosing your async runtime
|
25 |
| -The project currently supports both [`tokio`](tokio.rs) and [`async-std`](async.rs), controllable via feature flags. `tokio` is used by default. If you want to use `async-std`, you would disable the default features, and then select the `async-std-runtime` feature. For example in your `Cargo.toml`, you might specify the dependency as follows: |
| 27 | + |
| 28 | +The project currently supports [`tokio`](tokio.rs), [`async-std`](async.rs), and [`async-dispatcher`](https://github.com/zed-industries/async-dispatcher) controllable via feature flags. `tokio` is used by default. If you want to use `async-std`, you would disable the default features, and then select the `async-std-runtime` feature. For example in your `Cargo.toml`, you might specify the dependency as follows: |
| 29 | + |
26 | 30 | ```toml
|
27 | 31 | zeromq = { version = "*", default-features = false, features = ["async-std-runtime", "all-transport"] }
|
28 | 32 | ```
|
29 | 33 |
|
30 | 34 | See the section about feature flags for more info.
|
31 | 35 |
|
32 | 36 | ### Feature Flags
|
| 37 | + |
33 | 38 | Feature flags provide a way to customize the functionality provided by this library. Refer to [the cargo guide](https://doc.rust-lang.org/cargo/reference/features.html) for more info.
|
34 | 39 |
|
35 | 40 | Features:
|
36 | 41 | - (default) `tokio-runtime`: Use `tokio` as your async runtime.
|
37 | 42 | - `async-std-runtime`: Use `async-std` as your async runtime.
|
| 43 | +- `async-dispatcher-runtime`: Use `async-dispatcher` as your async runtime. |
38 | 44 | - (default) `all-transport`: Enable all the `*-transport` flags
|
39 | 45 | - `ipc-transport`: Enable IPC as a transport mechanism
|
40 | 46 | - `tcp-transport`: Enable TCP as a transport mechanism
|
41 | 47 |
|
42 | 48 | ## Contributing
|
| 49 | + |
43 | 50 | Contributions are welcome! See our issue tracker for a list of the things we need help with.
|
44 | 51 |
|
45 | 52 | ## Questions
|
| 53 | + |
46 | 54 | You can ask quesions in our Discord channel - https://discord.gg/pFXSqWtjQT
|
47 | 55 |
|
48 | 56 | ## Useful links
|
| 57 | + |
49 | 58 | * https://rfc.zeromq.org/
|
50 | 59 | * https://rfc.zeromq.org/spec:23/ZMTP/
|
51 | 60 | * https://rfc.zeromq.org/spec:28/REQREP/
|
|
0 commit comments