|
Sturk 1.1.0
Publish-subscribe C implementation.
|
Sturk is a C library that implements the publish-subscribe messaging pattern.
gcc -std=c99 -pedantic ....Sturk is designed with an intention to be used as a static library. Therefore, the most straightforward approach to compile a program that uses Sturk would be to build in two steps:
/path/to/sturk/build/src/libsturk.a./path/to/sturk/include.To configure the build see buildsystem.
To choose an OS or to add support for an OS see also osal.
Sturk consists of several modules with dependencies as shown in the Modules hierarchy diagram.
| Modules hierarchy |
The role of each module, hyperlink to its documentation and the location of its public header files are gathered in the Modules table. The ordering of the table corresponds to the modules hierarchy.
Table: Modules
| # | Module | Provides | Include subdirectory |
|---|---|---|---|
| 1 | broker | publish-subscribe utility | st (sturk) |
| 2 | algo | memory pool; waiting queue; dictionary | st (sturk) |
| 3 | logger | logging to stdout/stderr/file | st/logger (sturk/logger) |
| 4 | osal | memory allocator; filesystem; thread sync. | st/os (sturk/os) |
| 5 | basis | arena | st (sturk) |
| 6 | vertegs | subroutines for operating on graphs | vertegs |
The build is configured with a single yaml file. Before running make the configuration file must be passed to the configure.sh script in order to generate a makefile.
All possible build variables can be found inside olconf.yaml files from the src directory. The configuration is processed by olconf.py scripts.
Configuring with cver: "gnu" will pass -std=gnu11 to the compiler while cver: "iso" will pass -std=c99 -pedantic instead.
See src/olconf.py.
As an example see configs/iso/olconf.yaml and compare it to src/olconf.yaml.
The following
would overwrite the default configuration from src/olconf.yaml:
cver: "gnu",build_type: "release";with the configuration from configs/iso/olconf.yaml:
cver: "iso",build_type: "coverage".Table: Glossary
| Term | Description |
|---|---|
| OSAL | Operating System Abstraction Layer |
| API | Application Programming Interface |
| cirq | short name for doubly linked circular list |