https://github.com/adel-mamin/amast
A Minimalist ASynchronous Toolkit (AMAST) written in C99
https://github.com/adel-mamin/amast
active-object async async-await asynchronous-programming c99 embedded embedded-systems event-driven finite-state-machine firmware fsm fsm-library hierarchical-state-machine hsm libuv state-machine statechart
Last synced: 11 days ago
JSON representation
A Minimalist ASynchronous Toolkit (AMAST) written in C99
- Host: GitHub
- URL: https://github.com/adel-mamin/amast
- Owner: adel-mamin
- License: mit
- Created: 2024-09-04T15:43:30.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-04-09T17:52:44.000Z (13 days ago)
- Last Synced: 2025-04-09T18:38:28.169Z (13 days ago)
- Topics: active-object, async, async-await, asynchronous-programming, c99, embedded, embedded-systems, event-driven, finite-state-machine, firmware, fsm, fsm-library, hierarchical-state-machine, hsm, libuv, state-machine, statechart
- Language: C
- Homepage: https://amast.readthedocs.io/
- Size: 1.46 MB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Amast
Amast is a minimalist asynchronous toolkit that makes it easier to develop C language based projects. Written in C99.
## What Is Inside
Library name | Description
-------------|------------
ao | active object (preemptive and cooperative) ([documentation](https://github.com/adel-mamin/amast/blob/main/libs/ao/README.rst), [example](https://github.com/adel-mamin/amast/tree/main/apps/examples/dpp))
async | async/await ([documentation](https://github.com/adel-mamin/amast/blob/main/libs/async/README.rst), [example](https://github.com/adel-mamin/amast/tree/main/apps/examples/async))
dlist | doubly linked list
event | events ([documentation](https://github.com/adel-mamin/amast/blob/main/libs/event/README.rst))
fsm | finite state machine (FSM) ([documentation](https://github.com/adel-mamin/amast/blob/main/libs/fsm/README.rst))
hsm | hierarchical state machine (HSM) with submachines support ([documentation](https://github.com/adel-mamin/amast/blob/main/libs/hsm/README.rst), [examples](https://github.com/adel-mamin/amast/tree/main/apps/examples/hsm))
onesize | onesize memory allocator ([documentation](https://github.com/adel-mamin/amast/blob/main/libs/onesize/README.rst))
ringbuf | ring buffer ([documentation](https://github.com/adel-mamin/amast/blob/main/libs/ringbuf/README.rst), [example](https://github.com/adel-mamin/amast/tree/main/apps/examples/ringbuf))
slist | singly linked list
timer | timers ([documentation](https://github.com/adel-mamin/amast/blob/main/libs/timer/README.rst))## How Big Are Compile Sizes
Some x86-64 size figures to get an idea:
Library name | Code size [kB] | Data size [kB]
-------------|----------------|---------------
ao_cooperative | 3.92 | 0.57
ao_preemptive | 3.86 | 0.56
dlist | 1.29 | 0.00
event | 2.95 | 0.24
fsm | 0.91 | 0.02
hsm | 2.47 | 0.03
onesize | 1.39 | 0.00
queue | 1.90 | 0.00
ringbuf | 1.38 | 0.00
slist | 1.20 | 0.01
timer | 1.62 | 0.07## How To Compile For Amast Development
On Linux or WSL:
Install [pixi](https://pixi.sh/latest/#installation).
Run `pixi run all`.## How To Use The Latest Amast Release
Include
- `amast.h`
- `amast_config.h`
- `amast.c`
- `amast_preemptive.c` or `amast_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`
- `amast_libuv.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 the unit tests.
## Features, Bugs, etc.
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".
## How To Contribute
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](LICENSE.md).
## Star History
[](https://star-history.com/#adel-mamin/amast&Date)