Rust zeromq bindings.

Overview

Rust ZeroMQ bindings.

Travis Build Status Appveyor Build status Coverage Status Apache 2.0 licensed MIT licensed crates.io docs

Documentation

Release Notes

About

The zmq crate provides bindings for the libzmq library from the ZeroMQ project. The API exposed by zmq should be safe (in the usual Rust sense), but it follows the C API closely, so it is not very idiomatic. Also, support for libzmq API in "draft" state is considered out-of-scope for this crate; this includes currently, as of libzmq 4.3.3:

  • Newer, thread-safe socket types, such as ZMQ_CLIENT and ZMQ_SERVER.
  • The "poller" API.

For a more modern, idiomatic approach to libzmq bindings, including draft API features, have a look at libzmq-rs.

Compatibility

The current 0.9 release series requires libzmq 4.1 or newer. New release series of zmq may require newer libzmq versions.

Regarding the minimum Rust version required, zmq is CI-tested on current stable, beta and nightly channels of Rust. Additionally, it is made sure that the code still compiles on Rust 1.32.0. However, no tests are run for that build, so use zmq on older Rust versions on your own risk. It is however likely that it will just work anyways.

Installation

rust-zmq is available from crates.io. Users should add this to their Cargo.toml file:

[dependencies]
zmq = "0.9"

As rust-zmq is a wrapper around libzmq, you need a build of libzmq version 4.1 or newer, before attempting to build the zmq crate. There are several options available:

Dynamic linking using pkg-config

This is probably the preferred method when you are running a recent Unix-like OS that has support for pkg-config. For example, on recent Debian-based distributions, you can use the following command to get the prerequiste headers and library installed:

apt install libzmq3-dev

If your OS of choice does not provide packages of a new-enough libzmq, you can install it from source; see https://github.com/zeromq/libzmq/releases, although in this case, you may prefer a vendored build, which automates that, see below.

The build normally uses pkg-config to find out about libzmq's location. If that is not available, the environment variable LIBZMQ_PREFIX (or alternatively, LIBZMQ_LIB_DIR and LIBZMQ_INCLUDE_DIR) can be defined to avoid the invocation of pkg-config.

Windows build

When building on Windows, using the MSCV toolchain, consider the following when trying to link dynamically against libzmq:

  • When building libzmq from sources, the library must be renamed to zmq.lib from the auto named libzmq-v***-mt-gd-*_*_*.lib, libzmq.lib, libzmq-mt-*_*_*.lib, etc.
  • The folder containing the *.dll (dynamic link library) referred to by zmq.lib must be accessible via the path for the session that invokes the Rust compiler.
  • The name of the *.dll in question depends on the build system used for libzmq and can usually be seen when opening zmq.lib in a text editor.

Vendored build

Starting with the upcoming release 0.9.1 (or when building from current master), you can enable the vendored feature flag to have libzmq be built for you and statically linked into your binary crate. In your Cargo.toml, you can give users the option to do so using a dedicated feature flag:

[features]
vendored-zmq = ['zmq/vendored']

Cross-compilation

When you have a cross-compiled version of libzmq installed, you should be able to cross-compile rust-zmq, assuming a platform supporting pkg-config. For example, assuming you have libzmq compiled for the i686-pc-windows-gnu target installed in ~/.local-w32, the following should work:

PKG_CONFIG_PATH=$HOME/.local-w32/lib/pkgconfig \
PKG_CONFIG_ALLOW_CROSS=1 \
cargo build --target=i686-pc-windows-gnu --verbose

Cross compilation without pkg-config should work as well, but you need set LIBZMQ_PREFIX as described above.

Usage

rust-zmq is a pretty straight forward port of the C API into Rust:

fn main() {
    let ctx = zmq::Context::new();

    let socket = ctx.socket(zmq::REQ).unwrap();
    socket.connect("tcp://127.0.0.1:1234").unwrap();
    socket.send("hello world!", 0).unwrap();
}

You can find more usage examples in https://github.com/erickt/rust-zmq/tree/master/examples.

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed under the terms of both the Apache License, Version 2.0 and the MIT license without any additional terms or conditions.

See the contribution guidelines for what to watch out for when submitting a pull request.

Comments
  • Move to zeromq-src 0.2

    Move to zeromq-src 0.2

    • Update to zeromq-src with bumps libzmq version to 4.3.4 and enables building without cmake.
    • Link against libsodium for encryption support for security and performance reasons.

    Note that im unsure whether libsodium should be linked by default since I'm assuming not all users use CURVE.

    opened by jean-airoldie 29
  • Added vendored build support

    Added vendored build support

    This is the reopening of #262 since github does not allow the reopening of PRs after you force push.

    The vendored crate now compiles statically, adding dynamic compilation down the line would be trivial.

    opened by jean-airoldie 19
  • Build zeromq from source via zeromq-src-rs

    Build zeromq from source via zeromq-src-rs

    ~~Also fixed improperly formatted files.~~

    This would fix #257, at least the building from source part. Also related to #241.

    This uses zeromq-src for the source code and the tooling.

    I do not know if this builds in windows, since it only tested on ubuntu xenial and fedora 29.

    opened by jean-airoldie 17
  • Build broken for musl targets

    Build broken for musl targets

    I'm not sure if you have any features taking advantage of the most recent zeromq-src-rs, but I opened an upstream issue about the problem there. zeromq-src 0.10.0 doesn't have this build issue. This broke our downstream builds, when we started consuming zmq 0.10.0.

    opened by skeet70 15
  • Introduce `static-libzmq` crate feature for easier building of zmq crate.

    Introduce `static-libzmq` crate feature for easier building of zmq crate.

    Since @zachlute is not that active I open this PR which contains his and my changes. This PR replaces #239.

    This PR introduces a crate feature static-libzmq which builds libzmq and statically links it to the binary. This makes it easier for the users to use zmq crate without building libzmq on their own. It is tested on Windows and Linux. It is also tested in Linux embedded environments that cross-compilation is a must. Users are required to have cmake installed.

    Let know what improvements/changes you may need.

    opened by oblique 15
  • Undefined reference to `zmq_has', after installing correct bindings for Debian Jessie

    Undefined reference to `zmq_has', after installing correct bindings for Debian Jessie

    What I did:

    Installed clean Debian Jessie, needed packages and recommended zmq bindings

    apt install libzmq3-dev
    

    And:

    cargo build --release
    

    And:

    root@osboxes:/home/osboxes/ursadb# ~/.cargo/bin/cargo build --release
       Compiling zmq v0.8.2
    error: linking with `cc` failed: exit code: 1
      |
      = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/osboxes/ursadb/target/release/build/zmq-711f9aefae80083c/build_script_build-711f9aefae80083c.build_script_build0.rcgu.o" "-o" "/home/osboxes/ursadb/target/release/build/zmq-711f9aefae80083c/build_script_build-711f9aefae80083c" "/home/osboxes/ursadb/target/release/build/zmq-711f9aefae80083c/build_script_build-711f9aefae80083c.crate.allocator.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-L" "/home/osboxes/ursadb/target/release/deps" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/osboxes/ursadb/target/release/deps/libzmq_sys-a8aa15e613cdba62.rlib" "/home/osboxes/ursadb/target/release/deps/liblibc-cb2df4011e20c9ce.rlib" "/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-cc8b303e3403a89b.rlib" "/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-7ea6f64ea02051fd.rlib" "/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-f1fba9b54042d271.rlib" "/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-46a427bcbb71fa34.rlib" "/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-afe41ccc67b2a14a.rlib" "/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-aac5870ffe4fa74c.rlib" "/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-6a8e7eff29b6cad2.rlib" "/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_unicode-a768e53a3f571290.rlib" "/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-016e6e96bb6127b9.rlib" "/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-f2b084cc7a7d8bb1.rlib" "-Wl,-Bdynamic" "-l" "zmq" "-l" "util" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util" "-l" "util"
      = note: /home/osboxes/ursadb/target/release/build/zmq-711f9aefae80083c/build_script_build-711f9aefae80083c.build_script_build0.rcgu.o: In function `build_script_build::main::ha5cc5cd5a08c4033':
              build_script_build0-5ea246a54410eb6924d72faee8e217fe.rs:(.text._ZN18build_script_build4main17ha5cc5cd5a08c4033E+0x9a): undefined reference to `zmq_has'
              collect2: error: ld returned 1 exit status
    

    I thought that libzmq3-dev should be good for rust-zmq?

    opened by msm-code 15
  • zeromq-src

    zeromq-src

    I suggest to follow the example of rust-openssl to build the library from source if needed or when the developer requests it.

    rust-openssl has a crate feature 'vendored' which gets the openss source code by using the openssl-src crate. https://github.com/sfackler/rust-openssl/blob/master/openssl-sys/Cargo.toml#L15 Then ./configure --prefix=OUTDIR/... && make && make install is run. Afterwards the openssl libraries are available in OUTDIR/... The right compiler is found using the CC crate.

    This would enable zeromq to be used when e.g. cross-compiling to e.g. Android without struggle of the developer.

    Currently cargo build --target= requires the developer to build libzmq for that target beforehand. By supporting building from from we could avoid this.

    opened by AxelNennker 12
  • Build instructions for Windows?

    Build instructions for Windows?

    I'm interested in using this for projects in Windows, and I see there's an Appveyor build going (and plenty of issues related to windows) but I have no idea how to actually install/use it. Can instructions be compiled on how to make use of this?

    opened by bspeice 12
  • EAGAIN / socket::send

    EAGAIN / socket::send

    Hi ๐Ÿ‘‹!

    As you can see here, I tried to write a custom broker:

    • JS version: https://github.com/fabienjuif/zeromq-js-tryout
    • Rust version: https://github.com/fabienjuif/zeromq-rs-tryout

    The JS version hangs for some reason, I wanted to try with Rust because I don't know if this is the JS binding or a poor code design from my side.

    But I rely on socket::send to returns an error if the message can't be send (it helps me considerer a worker is dead, and try to send the task to an other). At this point, socket::send doesn't seems to send an error if message can't be delivered (I tried with and without flag zmq::DONTWAIT.

    My socket is in ROUTER mode (SocketType::ROUTER). With this code, if I kill the "worker" process, there is no error:

    socket.send(&worker_name, zmq::SNDMORE & zmq::DONTWAIT).unwrap();
    socket.send("", zmq::SNDMORE & zmq::DONTWAIT).unwrap(); // TODO: this could be removed!
    socket.send(&task.payload, zmq::DONTWAIT).unwrap();
    

    Same for this code:

    socket.send(&worker_name, zmq::SNDMORE).unwrap();
    socket.send("", zmq::SNDMORE).unwrap(); // TODO: this could be removed!
    socket.send(&task.payload, 0).unwrap();
    

    Is it something I don't understand or this is a known lack from rust-zmq?

    Versions:

    • zeromq: 4.3.1
    • rust-zmq: 0.9

    Thank you!

    opened by fabienjuif 11
  • Problem with Windows build

    Problem with Windows build

    Hello. I'm trying to build rust-zmq on Windows platform, but I'd collided with problem on link stage. I was set enviroment varible LIBZMQ_PREFIX, as discribed in guide. linker can't find external link _ZN18build_script_build4main. Is anybody know that problem? Maby the reason in version libzmq? Then which is version libzmq I must use?

    opened by SergeyPalamarchuk 11
  • Support for WASI

    Support for WASI

    Hey there, maybe you guys have heard about the new and shiny WebAssembly WASI standard?

    I think it might be very useful to try to add WASI support to rust-zmq. However, I am not sure whether the IPC is supported at all, I am far from being an expert in low-level Linux system calling ๐Ÿ˜„.

    Here are the WASI Core system APIs for reference.

    Thanks for your time!

    opened by skyne98 10
  • [feature] `Hash`able `SocketType`

    [feature] `Hash`able `SocketType`

    It seems like it would be useful to allow SocketType to be hashable so they could be used as keys in HashMaps or other similar collections.

    It appears this could be implemented by deriveing Hash.

    opened by bicarlsen 0
  • Implement `AsFd`/`AsSocket`

    Implement `AsFd`/`AsSocket`

    Requires Rust 1.63. If that's a problem it could use the io-lifetimes crate, or conditionally add these. But I see CI doesn't test on anything other than the latest stable.

    opened by ids1024 0
  • Update nix requirement from 0.23 to 0.26

    Update nix requirement from 0.23 to 0.26

    Updates the requirements on nix to permit the latest version.

    Changelog

    Sourced from nix's changelog.

    [0.26.1] - 2022-11-29

    Fixed

    • Fix UB with sys::socket::sockopt::SockType using SOCK_PACKET. (#1821)

    [0.26.0] - 2022-11-29

    Added

    • Added SockaddrStorage::{as_unix_addr, as_unix_addr_mut} (#1871)
    • Added MntFlags and unmount on all of the BSDs.
    • Added any() and all() to poll::PollFd. (#1877)
    • Add MntFlags and unmount on all of the BSDs. (#1849)
    • Added a Statfs::flags method. (#1849)
    • Added NSFS_MAGIC FsType on Linux and Android. (#1829)
    • Added sched_getcpu on platforms that support it. (#1825)
    • Added sched_getaffinity and sched_setaffinity on FreeBSD. (#1804)
    • Added line_discipline field to Termios on Linux, Android and Haiku (#1805)
    • Expose the memfd module on FreeBSD (memfd was added in FreeBSD 13) (#1808)
    • Added domainname field of UtsName on Android and Linux (#1817)
    • Re-export RLIM_INFINITY from libc (#1831)
    • Added syncfs(2) on Linux (#1833)
    • Added faccessat(2) on illumos (#1841)
    • Added eaccess() on FreeBSD, DragonFly and Linux (glibc and musl). (#1842)
    • Added IP_TOS SO_PRIORITY and IPV6_TCLASS sockopts for Linux (#1853)
    • Added new_unnamed and is_unnamed for UnixAddr on Linux and Android. (#1857)
    • Added SockProtocol::Raw for raw sockets (#1848)
    • added IP_MTU (IpMtu) IPPROTO_IP sockopt on Linux and Android. (#1865)

    Changed

    • The MSRV is now 1.56.1 (#1792)

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Curve encryption does not work with 0.10.0

    Curve encryption does not work with 0.10.0

    I am attempting to use curve encryption, it appears that libsodium is no longer used from 0.10.0, the following build commit changed this behavior:

    https://github.com/erickt/rust-zmq/commit/953c9dce33bf18cea743b65f560729d70a6b3e28

    However, I do not see any features which can be used to re-enable this behavior, nor can I find any documentation why this commit has been merged into main.

    opened by santidhammo 1
  • Compilation failure on old system

    Compilation failure on old system

    I'm trying to compile on an old Centos7 machine. All I've done is add the zmq = "0.10.0" dependency to my Cargo.toml file and rebuild and zmq-sys fails with this error:

    [zmq-sys 0.12.0] cargo:warning=/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and li brary support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or - std=gnu++11 compiler options.

    So my question is where do I add that c++ compiler option?

    opened by zephod77 3
  • Update env_logger requirement from 0.9 to 0.10

    Update env_logger requirement from 0.9 to 0.10

    Updates the requirements on env_logger to permit the latest version.

    Changelog

    Sourced from env_logger's changelog.

    0.10.0 - 2022-11-24

    MSRV changed to 1.60 to hide optional dependencies

    Fixes

    • Resolved soundness issue by switching from atty to is-terminal

    Breaking Changes

    To open room for changing dependencies:

    • Renamed termcolor feature to color
    • Renamed atty feature to auto-color

    0.9.3 - 2022-11-07

    • Fix a regression from v0.9.2 where env_logger would fail to compile with the termcolor feature turned off.

    0.9.2 - 2022-11-07

    • Fix and un-deprecate Target::Pipe, which was basically not working at all before and deprecated in 0.9.1.

    0.9.0 -- 2022-07-14

    Breaking Changes

    • Default message format now prints the target instead of the module

    Improvements

    • Added a method to print the module instead of the target
    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
Releases(v0.10.0)
  • v0.10.0(Nov 4, 2022)

    What's Changed

    This release mostly pushes rust-zmq to be on par with upstream zmq 4.3.4that was released earlier this year, which the major feature there being added websocket support.

    We have also worked hard to remove the cmake dependency 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 https://github.com/erickt/rust-zmq/pull/291
    • PollItem: Support checking associated socket by @fwalch in https://github.com/erickt/rust-zmq/pull/292
    • Attempt to fix the CI build by @rotty in https://github.com/erickt/rust-zmq/pull/294
    • Bump dependencies by @rotty in https://github.com/erickt/rust-zmq/pull/293
    • Remove std::error::Error description method implementations by @rotty in https://github.com/erickt/rust-zmq/pull/295
    • Add test using the ZMQ_CONFLATE option receiver-side by @rotty in https://github.com/erickt/rust-zmq/pull/297
    • Provide inherent method to get error message string by @rotty in https://github.com/erickt/rust-zmq/pull/298
    • Socket: Add binding for zmq_unbind by @kalcutter in https://github.com/erickt/rust-zmq/pull/300
    • Fix warnings by @erickt in https://github.com/erickt/rust-zmq/pull/319
    • Switch from compiletest_rs to trybuild by @erickt in https://github.com/erickt/rust-zmq/pull/320
    • Fix a clippy warning by @erickt in https://github.com/erickt/rust-zmq/pull/321
    • Fix flaky test_monitor_events test by @kalcutter in https://github.com/erickt/rust-zmq/pull/313
    • Fix errors with clippy 1.44.1 by @kalcutter in https://github.com/erickt/rust-zmq/pull/312
    • implement AsRawFd by @yihuang in https://github.com/erickt/rust-zmq/pull/306
    • Add Context getters and setters for ZMQ_IO_THREADS by @kalcutter in https://github.com/erickt/rust-zmq/pull/311
    • Upgrade to zmq2 by @Jasper-Bekkers in https://github.com/erickt/rust-zmq/pull/345
    • Move to zeromq-src 0.2 by @jean-airoldie in https://github.com/erickt/rust-zmq/pull/339
    • zmq-sys: Replace metadeps with system-deps successor by @MarijnS95 in https://github.com/erickt/rust-zmq/pull/340

    New Contributors

    • @kalcutter made their first contribution in https://github.com/erickt/rust-zmq/pull/300
    • @yihuang made their first contribution in https://github.com/erickt/rust-zmq/pull/306
    • @Jasper-Bekkers made their first contribution in https://github.com/erickt/rust-zmq/pull/345
    • @MarijnS95 made their first contribution in https://github.com/erickt/rust-zmq/pull/340

    Full Changelog: https://github.com/erickt/rust-zmq/compare/v0.9.2...v0.10.0

    Source code(tar.gz)
    Source code(zip)
Owner
Erick Tryzelaar
Erick Tryzelaar
Rust bindings for libssh

libssh-rs Bindings to libssh. This repo is home to the libssh-rs-sys crate, which provides FFI bindings to libssh. Features The vendored feature cause

Wez Furlong 18 Jan 2, 2023
Grow Rust is a Growtopia Private Server made in Rust

Grow Rust is a Growtopia Private Server made in Rust

null 14 Dec 7, 2022
Multiplex server for rust-analyzer, allows multiple LSP clients (editor windows) to share a single rust-analyzer instance per cargo workspace

ra-multiplex โ€ƒ Multiplex server for rust-analyzer, allows multiple LSP clients (editor windows) to share a single rust-analyzer instance per cargo wor

max 95 Dec 29, 2022
DNS Server written in Rust for fun, see https://dev.to/xfbs/writing-a-dns-server-in-rust-1gpn

DNS Fun Ever wondered how you can write a DNS server in Rust? No? Well, too bad, I'm telling you anyways. But don't worry, this is going to be a fun o

Patrick Elsen 26 Jan 13, 2023
Rust crate for configurable parallel web crawling, designed to crawl for content

url-crawler A configurable parallel web crawler, designed to crawl a website for content. Changelog Docs.rs Example extern crate url_crawler; use std:

Pop!_OS 56 Aug 22, 2021
Rust crate for scraping URLs from HTML pages

url-scraper Rust crate for scraping URLs from HTML pages. Example extern crate url_scraper; use url_scraper::UrlScraper; fn main() { let director

Pop!_OS 35 Aug 18, 2022
FTP client for Rust

rust-ftp FTP client for Rust Documentation rust-ftp Installation Usage License Contribution Development environment Installation FTPS support is achie

Matt McCoy 155 Nov 12, 2022
The gRPC library for Rust built on C Core library and futures

gRPC-rs gRPC-rs is a Rust wrapper of gRPC Core. gRPC is a high performance, open source universal RPC framework that puts mobile and HTTP/2 first. Sta

TiKV Project 1.6k Jan 7, 2023
A library to work with CIDRs in rust

ipnetwork This is a library to work with IPv4 and IPv6 CIDRs in Rust Run Clippy by doing rustup component add clippy cargo clippy Installation This c

Abhishek Chanda 98 Dec 12, 2022
Network simulation in Rust

netsim - A Rust library for network simulation and testing (currently linux-only). netsim is a crate for simulating networks for the sake of testing n

Andrew Cann 115 Dec 15, 2022
Cross-platform, low level networking using the Rust programming language.

libpnet Linux โˆช OS X Build Status: Windows Build Status: Discussion and support: #libpnet on freenode / #rust-networking on irc.mozilla.org / #rust on

null 1.8k Jan 6, 2023
A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

Tokio A runtime for writing reliable, asynchronous, and slim applications with the Rust programming language. It is: Fast: Tokio's zero-cost abstracti

Tokio 18.7k Dec 30, 2022
Easy protocol definitions in Rust

protocol Documentation Easy protocol definitions in Rust. This crate adds a custom derive that can be added to types, allowing structured data to be s

Dylan McKay 157 Dec 30, 2022
Actor framework for Rust.

Actix Actor framework for Rust Documentation User Guide API Documentation API Documentation (master branch) Features Async and sync actors Actor commu

Actix 7.6k Jan 7, 2023
Nanomsg library for Rust

Nanomsg Documentation Nanomsg is a modern messaging library that is the successor to ZeroMQ, written in C by Martin Sustrik and colleagues. The nanoms

Daniel Fagnan 371 Nov 18, 2022
NNTP client for Rust

rust-nntp NNTP Client for Rust Usage extern crate nntp; use nntp::{Article, NNTPStream}; fn main() { let mut nntp_stream = match NNTPStream::connec

Matt McCoy 13 Jan 22, 2022
POP3 client for Rust

rust-pop3 POP3 Client for Rust This client has SSL support. SSL is configured using an SSLContext that is passed into the connect method of a POP3Stre

Matt McCoy 26 Dec 19, 2022
A STOMP client in Rust. Compatible with RabbitMQ, ActiveMQ.

stomp-rs stomp-rs provides a full STOMP 1.2 client implementation for the Rust programming language. This allows programs written in Rust to interact

Zack Slayton 84 Dec 4, 2022
A ยตTP (Micro/uTorrent Transport Library) library implemented in Rust

rust-utp A Micro Transport Protocol library implemented in Rust. API documentation Overview The Micro Transport Protocol is a reliable transport proto

Ricardo Martins 134 Dec 11, 2022