zmq
High-level bindings to the zeromq library
0.10.0
6.4M downloads/mo
#3996 most downloaded on crates.io
erickt/rust-zmq
What this package is like to depend on
Last release 4 years ago
no release in 18 months
Ships unpredictably
gaps range from 8 days to 3.1 years
Some releases are documented
notes for 8 of 19 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
19 releases · first in 2014
0 releases in the last 12 months
see the full history below
Release timeline
19 releases · Nov 2014 to Nov 2022Releases
latest 19-
0.10.004 Nov 2022Release notes
Open source →What's Changed
This release mostly pushes rust-zmq to be on par with upstream zmq 4.3.4 that was released earlier this year, which the major feature there being added websocket support.
We have also worked hard to remove the
cmakedependency from this project, meaning that no additional developer setup instructions are needed for downstream users of this crate.Changelog
- Remove log code from library by @fwalch in #291
- PollItem: Support checking associated socket by @fwalch in #292
- Attempt to fix the CI build by @rotty in #294
- Bump dependencies by @rotty in #293
- Remove
std::error::Errordescription method implementations by @rotty in #295 - Add test using the
ZMQ_CONFLATEoption receiver-side by @rotty in #297 - Provide inherent method to get error message string by @rotty in #298
- Socket: Add binding for
zmq_unbindby @kalcutter in #300 - Fix warnings by @erickt in #319
- Switch from compiletest_rs to trybuild by @erickt in #320
- Fix a clippy warning by @erickt in #321
- Fix flaky
test_monitor_eventstest by @kalcutter in #313 - Fix errors with clippy 1.44.1 by @kalcutter in #312
- implement AsRawFd by @yihuang in #306
- Add
Contextgetters and setters forZMQ_IO_THREADSby @kalcutter in #311 - Upgrade to
zmq2by @Jasper-Bekkers in #345 - Move to zeromq-src 0.2 by @jean-airoldie in #339
- zmq-sys: Replace
metadepswithsystem-depssuccessor by @MarijnS95 in #340
New Contributors
- @kalcutter made their first contribution in #300
- @yihuang made their first contribution in #306
- @Jasper-Bekkers made their first contribution in #345
- @MarijnS95 made their first contribution in #340
Full Changelog: v0.9.2...v0.10.0
-
0.9.221 Sep 2019Release notes
Open source →New and improved functionality
- Support for the
ZMQ_REQ_RELAXEDandZMQ_REQ_CORRELATEsocket options, implemented in #285.
Compatibility
-
SocketType,Mechanism, andErrorcan not longer be cast to an integer type and expected to get the correspondinglibzmqC-level value. The ability to cast to integers and get the C enum values was never a documented part of the API, so this is not considered a breaking change.Unfortunately, the
SocketEventcan not be future-proofed in this way; the monitoring API needs breaking changes to gain a reasonable level of type-safety.
Fixes
- A potential panic in
Message::getsinvolving messages with non-UTF8 property values has been fixed; see #288.
Release notes
Open source →New and improved functionality
- Support for the ZMQ_REQ_RELAXED and ZMQ_REQ_CORRELATE socket options, implemented in #285.
Compatibility
SocketType , Mechanism , and Error can not longer be cast to an integer type and expected to get the corresponding libzmq C-level value. The ability to cast to integers and get the C enum values was never a documented part of the API, so this is not considered a breaking change.
Unfortunately, the SocketEvent can not be future-proofed in this way; the monitoring API needs breaking changes to gain a reasonable level of type-safety.
Fixes
- A potential panic in Message::gets involving messages with non-UTF8 property values has been fixed; see #288.
- Support for the
-
0.9.130 May 2019Release notes
Open source →New and improved functionality
-
Added
vendoredfeature which buildlibzmqfrom source viazeromq-src, see theREADMEfor details; discussed in #257 and implemented in #267. -
The installed
libzmqC library is no longer feature-probed at build time, and all the wrapped API is exposed. Using features unsupported by the installedlibzmqlibrary will lead to run-time errors, like they would in C.This should enable cross-compiling without jumping through additional hoops.
Implemented in #276.
-
The
Messagedata type now implementsFrom<Box<[u8]>. -
The
Messagedata type has gained a new constructorwith_size, which replaces the now-deprecated, confusingly-namedwith_capacityconstructor. Reported in #215 and fixed in #272. -
New functions
proxy_steerableandproxy_steerable_with_capture, which wrap thezmq_proxy_steerableC function. Implemented in #242.
Deprecations
- The
Messageconstructorswith_capacity_unallocated,with_capacityandfrom_slicemethods are deprecated, the first one without a planned alternative (#272).
Platform requirements
- The codebase has been switched to the Rust 2018 edition and requires
rustc1.32.0 or newer. Compatibility back to 1.32.0 is now ensured via CI.
Release notes
Open source →New and improved functionality
Added vendored feature which build libzmq from source via zeromq-src , see the README for details; discussed in #257 and implemented in #267.
The installed libzmq C library is no longer feature-probed at build time, and all the wrapped API is exposed. Using features unsupported by the installed libzmq library will lead to run-time errors, like they would in C.
This should enable cross-compiling without jumping through additional hoops.
Implemented in #276.
The Message data type now implements From<Box<[u8]> .
The Message data type has gained a new constructor with_size , which replaces the now-deprecated, confusingly-named with_capacity constructor. Reported in #215 and fixed in #272.
New functions proxy_steerable and proxy_steerable_with_capture , which wrap the zmq_proxy_steerable C function. Implemented in #242.
Deprecations
- The Message constructors with_capacity_unallocated , with_capacity and from_slice methods are deprecated, the first one without a planned alternative (#272).
Platform requirements
- The codebase has been switched to the Rust 2018 edition and requires rustc 1.32.0 or newer. Compatibility back to 1.32.0 is now ensured via CI.
-
-
0.9.014 Dec 2018Release notes
Open source →Incompatible API changes
-
Requires ZeroMQ 4.1+.
-
The deprecated
Constantsenum has been removed from the API. -
Message allocation, e.g.
Message::new()directly returnsMessageinstead ofResult<Message>and will panic on allocation failure, as is customary in Rust. Reported in #118 and fixed by #130.
New and improved functionality
-
Messagenow implementsFromfor various types that have an obvious byte-level representation. This is possible due to the message allocation API change (see above). -
Message::send()now works onInto<Message>types, obsoletingsend_msg()andsend_str(). -
Added support for connection timeouts, heartbeats, and xpub welcome messages.
Deprecations
Message::send_msg()andsend_str()are deprecated in favor ofMessage::send().
Release notes
Open source →Incompatible API changes
Requires ZeroMQ 4.1+.
The deprecated Constants enum has been removed from the API.
Message allocation, e.g. Message::new() directly returns Message instead of Result<Message> and will panic on allocation failure, as is customary in Rust. Reported in #118 and fixed by #130.
New and improved functionality
Message now implements From for various types that have an obvious byte-level representation. This is possible due to the message allocation API change (see above).
Message::send() now works on Into<Message> types, obsoleting send_msg() and send_str() .
Added support for connection timeouts, heartbeats, and xpub welcome messages.
Deprecations
- Message::send_msg() and send_str() are deprecated in favor of Message::send() .
-
-
0.8.319 May 2019Release notes
Open source →New and improved functionality
- Support for the
zmq_socket_monitorAPI. - Added
PollItem::set_events, which allows for constructing aPollItemfrom arbitrary file descriptors.
Bug fixes
- Fix feature detection for
zmq_has(issue #207).
Release notes
Open source →New and improved functionality
-
Support for the zmq_socket_monitor API.
-
Added PollItem::set_events , which allows for constructing a PollItem from arbitrary file descriptors.
Bug fixes
- Fix feature detection for zmq_has (issue #207).
- Support for the
-
0.8.227 Jul 2017Release notes
Open source →New and improved functionality
- Support for the
ZMQ_PROBE_ROUTERandZMQ_ROUTER_MANDATORYsocket options. zmq_disconnectis now exposed asSocket::disconnect.
Bug fixes
- Fix build on OpenBSD (issue #170).
- Account for OpenBSD not defining
EPROTO. - Fix build for 32-bit Windows.
- Handle
EINTRinError::from_raw(issue #174). - Alignment of
zmq_msg_tFFI type fixed. - Fix
build.rsto portably construct paths, instead of hard-coding slash as path separator.
Release notes
Open source →New and improved functionality
-
Support for the ZMQ_PROBE_ROUTER and ZMQ_ROUTER_MANDATORY socket options.
-
zmq_disconnect is now exposed as Socket::disconnect .
Bug fixes
-
Fix build on OpenBSD (issue #170).
-
Account for OpenBSD not defining EPROTO .
-
Fix build for 32-bit Windows.
-
Handle EINTR in Error::from_raw (issue #174).
-
Alignment of zmq_msg_t FFI type fixed.
-
Fix build.rs to portably construct paths, instead of hard-coding slash as path separator.
- Support for the
-
0.8.101 Jan 2017Release notes
Open source →This release fixes the remaining Windows-specific issues exposed by our test suite, as well as improving API convenience a bit.
New and improved functionality
- Should now work on Windows.
Messagenow provides theEqtrait.From<Error>is now provided forstd::io::Error(issue #136).- There is now a type alias
PollEventsmapping toi16. Use that instead ofi16to refer to a set of poll events; in 0.9,PollEventswill become a separate type. PollItemnow has methodsis_readable,is_writableandis_error; use those in preference to using bit masking operations when applicable.- New example zguide example
mspoller. - Some documentation improvements.
- There is now a Unix-specific test integrating
zmqwith Unixpoll(2).
Incompatible API changes
There has been a minor API change that was deemed necessary for cross-platform support and to fix broken parts of the API:
- There is now an internal
RawFdtype alias that maps toRawFdon Unixoids andRawSocketon Windows.Socket::get_fd()andPollItem::from_fd()now use that instead ofi64andc_int, respectively.
Release notes
Open source →This release fixes the remaining Windows-specific issues exposed by our test suite, as well as improving API convenience a bit.
New and improved functionality
-
Should now work on Windows.
-
Message now provides the Eq trait.
-
From<Error> is now provided for std::io::Error (issue #136).
-
There is now a type alias PollEvents mapping to i16 . Use that instead of i16 to refer to a set of poll events; in 0.9, PollEvents will become a separate type.
-
PollItem now has methods is_readable , is_writable and is_error ; use those in preference to using bit masking operations when applicable.
-
New example zguide example mspoller .
-
Some documentation improvements.
-
There is now a Unix-specific test integrating zmq with Unix poll(2) .
Incompatible API changes
There has been a minor API change that was deemed necessary for cross-platform support and to fix broken parts of the API:
- There is now an internal RawFd type alias that maps to RawFd on Unixoids and RawSocket on Windows. Socket::get_fd() and PollItem::from_fd() now use that instead of i64 and c_int , respectively.
-
0.8.009 Dec 2016Release notes
Open source →This is a feature and bugfix release. The API has changed, partially in slightly incompatible ways. Typical code, for some suitable value of "typical", should still compile when it did with 0.7, but expect a lot of warnings due to reduced mutability requirements for
SocketandContext.Note that this release adds initial support for the Windows platform (PR #124). While the code now compiles, the test suite is still broken under Windows (issue #125).
Since these release notes have been assembled post-hoc, they are highly likely to be incomplete.
Incompatible API changes
The following methods of
Socketchanged:- The deprecated
close()method has been removed. to_raw()is now known asinto_raw().borrow_raw()is known asas_mut_ptr(), and takes a&mut selfnow.
New and improved functionality
Note that the added
CURVEandGSSAPIparts of the API are conditional, depending on the compile-time detected capabilities of libzmq.- Most methods of
Socketno longer require&mut self. Contextnow can be shared across threads- rust-zmq should now work across a wider range of libzmq versions.
- More functions now have minimal documentation, but there is still lots of improvements to make in this area.
- Initial API coverage for encryption via the
MechanismandCurveKeyPairdata types. - Wrappers for the Z85 codec (
z85_encodeandz85_decode). - New socket option accessors for:
ZMQ_LAST_ENDPOINTZMQ_IMMEDIATEZMQ_PROBE_ROUTER,ZMQ_ROUTER_MANDATORYZMQ_RCVTIMEO,ZMQ_SNDTIMEO- Various Kerberos (aka
GSSAPI) and encryption-related (akaCURVE) options.
- New zguide examples
fileio3,msreader,rtdealer,lvcache,pathopubandpathosub. - There now is a test suite.
Deprecations
Constantswill be removed from public API in the next release; it should not be needed in client code, since corresponding functionality is provided in a higher-level form.Bugfixes
Yes, there have been bugs that were fixed; hopefully for the next releases, a reasonably accurate list of those will be provided.
Internals
Some redundancy in error handling and socket option handling has been abstracted over using macros.
Release notes
Open source →This is a feature and bugfix release. The API has changed, partially in slightly incompatible ways. Typical code, for some suitable value of "typical", should still compile when it did with 0.7, but expect a lot of warnings due to reduced mutability requirements for Socket and Context .
Note that this release adds initial support for the Windows platform (PR #124). While the code now compiles, the test suite is still broken under Windows (issue #125).
Since these release notes have been assembled post-hoc, they are highly likely to be incomplete.
Incompatible API changes
The following methods of Socket changed:
-
The deprecated close() method has been removed.
-
to_raw() is now known as into_raw() .
-
borrow_raw() is known as as_mut_ptr() , and takes a &mut self now.
New and improved functionality
Note that the added CURVE and GSSAPI parts of the API are conditional, depending on the compile-time detected capabilities of libzmq.
-
Most methods of Socket no longer require &mut self .
-
Context now can be shared across threads
-
rust-zmq should now work across a wider range of libzmq versions.
-
More functions now have minimal documentation, but there is still lots of improvements to make in this area.
-
Initial API coverage for encryption via the Mechanism and CurveKeyPair data types.
-
Wrappers for the Z85 codec ( z85_encode and z85_decode ).
-
New socket option accessors for:
-
ZMQ_LAST_ENDPOINT
-
ZMQ_IMMEDIATE
-
ZMQ_PROBE_ROUTER , ZMQ_ROUTER_MANDATORY
-
ZMQ_RCVTIMEO , ZMQ_SNDTIMEO
-
Various Kerberos (aka GSSAPI ) and encryption-related (aka CURVE ) options.
-
New zguide examples fileio3 , msreader , rtdealer , lvcache , pathopub and pathosub .
-
There now is a test suite.
Deprecations
Constants will be removed from public API in the next release; it should not be needed in client code, since corresponding functionality is provided in a higher-level form.
Bugfixes
Yes, there have been bugs that were fixed; hopefully for the next releases, a reasonably accurate list of those will be provided.
Internals
Some redundancy in error handling and socket option handling has been abstracted over using macros.
You can’t perform that action at this time.
- The deprecated
-
0.7.026 Jun 2015Nothing published for this version
-
0.6.722 Apr 2015Nothing published for this version
-
0.6.604 Apr 2015Nothing published for this version
-
0.6.503 Apr 2015Nothing published for this version
-
0.6.401 Apr 2015Nothing published for this version
-
0.6.330 Mar 2015Nothing published for this version
-
0.6.226 Mar 2015Nothing published for this version
-
0.6.126 Feb 2015Nothing published for this version
-
0.6.009 Dec 2014Nothing published for this version
-
0.5.221 Nov 2014Nothing published for this version
-
0.5.111 Nov 2014Nothing published for this version