Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I don't understand the repo strategy of zeromq

Tags:

zeromq

It seems that zeromq (https://github.com/zeromq/libzmq) is written in C++, but also provides separate bindings for C++ (https://github.com/zeromq/cppzmq).

When libzmq is made it only provides these files in its build directory:

libunity.a  libzmq.a  libzmq.so  libzmq.so.5  libzmq.so.5.2.2

and no header files.

What is the advantage of providing bindings and libraries in separate repos? Even if there are many bindings, shouldn't some set of standard bindings always be included?

like image 449
tjb Avatar asked Nov 18 '25 04:11

tjb


1 Answers

libzmq is internally implemented in C++, put only exposes a C API/ABI to ensure wide usability and long-term stability of the API/ABI. A C API/ABI makes it easy to provide direct bindings in other languages such as cppzmq, or higher-level libraries such a czmq, which again has a C API/ABI and a large number of language bindings.

Also, it is relatively easy to evolve the API/ABI in a manner that does not affect existing users.

Note that this guarantee only applies to the parts of the API/ABI declared as STABLE. Newer features are DRAFT until they have matured.

Exposing a C++ API would make bindings in other languages and ensuring ABI stability much harder.

like image 88
Simon Avatar answered Nov 21 '25 10:11

Simon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!