Libmodule is a C library targeting linux aiming to let developers easily create modular C projects in a way which is both simple and elegant.
You will write less code, focusing on what really matters.
It stands somewhere in the middle, trying to mix the 2 concepts.
It does not provide any faciliting to build an event loop; it does provide its own event loop though.
You may find some/lots of similarities between a libmodule's Module and an Actor.
Indeed, libmodule was heavily inspired by my own actor library experience with akka for its API.
No, it is not: it uses epoll, which is linux specific.
Moreover it heavily relies upon gcc attributes that may or may not be available for your compiler.
It is tested with both gcc and clang through travis.
Any patch to support other platforms is warmly welcomed though.
Yes, it is availabe at http://libmodule.readthedocs.io/en/latest/.
You have some nice examples too, check Samples folder.
Unsurprisingly, module is the core concept of libmodule architecture.
It can be somewhat seen as a class, and shares lots of concepts with an Actor.
It helps you to write standard and clean projects with small units, so called modules, whose job should be self-contained.
We all know OOP is not a solution to every problem and C is still a beautiful and much used language.
Still, I admit to love code modularity that OOP enforces; moreover, I realized that I was using same code abstractions over and over in my C projects (both side projects and at my job).
So I thought that writing a library to achieve those same abstractions in a cleaner and simpler way was the right thing to do.
You only need cmake to build libmodule; it does not depend upon external software.
Libmodule includes an hashmap implementation provided by Pete Warden (thank you!).
To build, you only need to issue:
$ mkdir build
$ cd build
$ cmake ../
$ make
If you wish to install, then you only need:
# make install
Libmodule will install a pkg-config file too. Use this to link libmodule in your projects, or use "-lmodule" linker flag.
Please note that in order to test examples, there is no need to install the library.
For Archlinux users, a PKGBUILD can be found in Extra/Arch folder.