SkillAgentSearch skills...

Czmq

High-level C binding for ØMQ

Install / Use

/learn @zeromq/Czmq
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

GitHub release OBS draft OBS stable <a target="_blank" href="http://webchat.freenode.net?channels=%23zeromq&uio=d4"><img src="https://cloud.githubusercontent.com/assets/493242/14886493/5c660ea2-0d51-11e6-8249-502e6c71e9f2.png" height = "20" /></a> license

CZMQ - High-level C binding for ØMQ

| Linux & MacOSX | Windows | |:--------------:|:--------:| |Build Status|Build status|

Contents

Overview

Scope and Goals

Ownership and License

Using CZMQ

Install from a package manager

Building on Linux and macOS

Building on Windows

Building for iOS

Linking with an Application

Use from Other Languages

API v3 Summary

Error Handling

CZMQ Actors

Under the Hood

Adding a New Class

Documentation

Development

Porting CZMQ

Hints to Contributors

Code Generation

This Document

Overview

Scope and Goals

CZMQ has these goals:

  • To wrap the ØMQ core API in semantics that lead to shorter, more readable applications.
  • To hide as far as possible the differences between different versions of ØMQ (2.x, 3.x, 4.x).
  • To provide a space for development of more sophisticated API semantics.
  • To wrap the ØMQ security features with high-level tools and APIs.
  • To become the basis for other language bindings built on top of CZMQ.

CZMQ grew out of concepts developed in ØMQ - The Guide.

<center> <img src="https://github.com/zeromq/czmq/raw/master/images/README_1.png" alt="1"> </center>

Ownership and License

The contributors are listed in AUTHORS. This project uses the MPL v2 license, see LICENSE.

CZMQ uses the C4.1 (Collective Code Construction Contract) process for contributions.

CZMQ uses the CLASS (C Language Style for Scalabilty) guide for code style.

To report an issue, use the CZMQ issue tracker at github.com.

Using CZMQ

Install from a package manager

Linux

Deb packages are available for Debian and Ubuntu.

For other distros please refer to pkgs.org.

You can also get prebuild binaries for latest git master for most distros on openSUSE's Build Service:

Git master only stable APIs: http://software.opensuse.org/download.html?project=network%3Amessaging%3Azeromq%3Agit-stable&package=czmq

Git master including draft APIs: http://software.opensuse.org/download.html?project=network%3Amessaging%3Azeromq%3Agit-draft&package=czmq

MacOS

On macOS install czmq with Homebrew see here.

Windows

Using vcpkg

If you are already using vcpkg, you can download and install czmq with one single command:

vcpkg.exe install czmq

this will build czmq as a 32-bit shared library.

vcpkg.exe install czmq:x64-windows-static

this will build czmq as a 64-bit static library.

You may also build czmq with one or more optional libraries:

vcpkg.exe install czmq[curl,httpd,lz4]:x64-windows

this will build czmq with libcurl, libmicrohttpd, lz4, as a 64-bit shared library.

To use the draft APIs, you may build czmq with draft feature:

vcpkg install czmq[draft]

If you are an adventurer, and want to always use the latest version of czmq, pass an extra --head option:

vcpkg.exe install czmq --head

These commands will also print out instructions on how to use the library from your MSBuild or CMake-based projects.

Building on Linux and macOS

To start with, you need at least these packages:

  • git -- git is how we share code with other people.
  • build-essential, libtool, pkg-config - the C compiler and related tools.
  • autotools-dev, autoconf, automake - the GNU autoconf makefile generators.
  • cmake - the CMake makefile generators (an alternative to autoconf).

Plus some others:

  • uuid-dev, libpcre3-dev - utility libraries.
  • valgrind - a useful tool for checking your code.
  • pkg-config - an optional useful tool to make building with dependencies easier.

Which we install like this (using the Debian-style apt-get package manager):

sudo apt-get update
sudo apt-get install -y \
    git build-essential libtool \
    pkg-config autotools-dev autoconf automake cmake \
    uuid-dev libpcre3-dev valgrind

# only execute this next line if interested in updating the man pages as well (adds to build time):
sudo apt-get install -y asciidoc

Here's how to build CZMQ from GitHub (building from packages is very similar, you don't clone a repo but unpack a tarball), including the libzmq (ZeroMQ core) library (NOTE: skip ldconfig on OSX):

git clone https://github.com/zeromq/libzmq.git
cd libzmq
./autogen.sh
# do not specify "--with-libsodium" if you prefer to use internal tweetnacl security implementation (recommended for development)
./configure --with-libsodium
make check
sudo make install
sudo ldconfig
cd ..

git clone https://github.com/zeromq/czmq.git
cd czmq
./autogen.sh && ./configure && make check
sudo make install
sudo ldconfig
cd ..

In general CZMQ works best with the latest libzmq master. If you already have an older version of libzmq installed on your system, e.g. in /usr/, then you ca

Related Skills

View on GitHub
GitHub Stars1.3k
CategoryDevelopment
Updated3d ago
Forks538

Languages

C

Security Score

95/100

Audited on Mar 26, 2026

No findings