A native implementation of ØMQ in Rust
  • Rust 96.5%
  • Python 2.9%
  • C 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-04-06 15:19:47 +02:00
.cargo chore: sync dependencies (monorepo) 2026-03-31 14:24:27 +02:00
benches Add explicit lifetime annotation to BenchGroup in req_rep benchmark 2024-12-13 12:03:31 -08:00
c_benches Added simple files for comparision of C performance 2020-11-23 02:21:03 +02:00
examples chore: sync dependencies (monorepo) 2026-04-06 15:19:47 +02:00
python Added working python version of pipeline 2020-11-22 16:08:47 +02:00
src chore: sync dependencies (monorepo) 2026-04-06 15:19:47 +02:00
tests chore: sync dependencies (monorepo) 2026-03-31 18:35:20 +02:00
.gitignore Ignores 2020-01-31 00:57:06 +02:00
Cargo.toml chore: sync dependencies (monorepo) 2026-04-06 15:19:47 +02:00
LICENSE.md Added LICENSE file 2020-03-27 00:05:11 +02:00
README.md support xpub 2025-12-18 15:16:24 -08:00
release.toml Add release tooling with changelog automation (#232) 2026-03-04 15:03:31 -08:00
rustfmt.toml Update rustfmt.toml 2020-09-17 03:16:40 -04:00

zmq.rs - A native Rust implementation of ZeroMQ

DISCLAIMER: This codebase does not implement all of ZeroMQ's feature set.

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, and leverage Rust's async ecosystem.

Current status

Basic ZMTP implementation is working and tested against the reference implementation.

Supported transport types:

  • TCP
  • IPC (unix only)

Supported socket patterns:

  • Request/Response (REQ, REP, DEALER, ROUTER)
  • Publish/Subscribe (PUB, SUB, XPUB)
  • Pipeline (PUSH, PULL)

Usage

See the 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.

Choosing your async runtime

The project currently supports tokio, async-std, and 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:

zeromq = { version = "*", default-features = false, features = ["async-std-runtime", "all-transport"] }

See the section about feature flags for more info.

Feature Flags

Feature flags provide a way to customize the functionality provided by this library. Refer to the cargo guide for more info.

Features:

  • (default) tokio-runtime: Use tokio as your async runtime.
  • async-std-runtime: Use async-std as your async runtime.
  • async-dispatcher-runtime: Use async-dispatcher as your async runtime.
  • (default) all-transport: Enable all the *-transport flags
  • ipc-transport: Enable IPC as a transport mechanism
  • tcp-transport: Enable TCP as a transport mechanism

Contributing

Contributions are welcome! See our issue tracker for a list of the things we need help with.

Questions

You can ask quesions in our Discord channel - https://discord.gg/pFXSqWtjQT