Amast is a minimalist asynchronous toolkit that makes it easier to develop C language based projects. Written in C99.
Library name | Description |
---|---|
ao | active object (preemptive and cooperative) (documentation, example) |
async | async/await (documentation, example) |
dlist | doubly linked list |
event | events (documentation) |
fsm | finite state machine (FSM) (documentation) |
hsm | hierarchical state machine (HSM) with submachines support (documentation, examples) |
onesize | onesize memory allocator (documentation) |
ringbuf | ring buffer (documentation, example) |
slist | singly linked list |
timer | timers (documentation) |
Some x86-64 size figures to get an idea:
Library name | Code size [kB] | Data size [kB] |
---|---|---|
ao_cooperative | 3.50 | 0.56 |
ao_preemptive | 3.53 | 0.56 |
dlist | 1.29 | 0.00 |
event | 3.23 | 0.24 |
fsm | 0.68 | 0.02 |
hsm | 2.39 | 0.03 |
onesize | 1.34 | 0.00 |
queue | 1.39 | 0.00 |
ringbuf | 1.38 | 0.00 |
slist | 1.20 | 0.01 |
timer | 1.48 | 0.07 |
On Linux or WSL:
Install pixi.
Run pixi run all
.
Include
amast.h
amast_config.h
amast.c
amast_preemptive.c
oramast_cooperative.c
from the latest release to your project.
If you want to use Amast features that require porting, then also add the following port to you project:
amast_posix.c
If you want to run Amast unit tests, then also include amast_test.h
and amast_test.c
.
Makefile
is available for optional use. Run make test
to run unit tests.
The project uses "Discussions" instead of "Issues".
"Discussions" tab has different discussion groups for "Features" and "Bugs".
For making sure issues are addressed, both me and the community can better evaluate which issues and features are high priority because they can be "upvoted".
If you find the project useful, then please star it. It helps promoting it.
If you find any bugs, please report them.
Amast is open-sourced software licensed under the MIT license.