A lightweight, portable C implementation of the MessagePack serialization format (spec v5).
CMP is a C implementation of the MessagePack binary serialization format, allowing efficient encoding and decoding of data structures for storage or transmission. It solves the need for a minimal, dependency-free serialization library in C that works across different platforms and systems.
C developers working on embedded systems, network applications, or any project requiring fast, portable data serialization with minimal overhead.
Developers choose CMP for its zero heap allocations, strict standards compliance, and flexibility—it can work with any data backend (files, memory, sockets) while providing robust error handling and thread safety.
An implementation of the MessagePack serialization format in C / msgpack.org[C]
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Operates without dynamic memory allocation, making it ideal for resource-constrained environments like embedded systems.
Written in C89 with minimal dependencies on stdbool.h, stdint.h, and string.h, ensuring wide compiler and platform compatibility.
Works with any data source via user-provided read/write/skip functions, allowing seamless integration with files, memory, or network sockets.
Provides comprehensive error codes and messages similar to errno/strerror, facilitating easy debugging and error handling.
Requires developers to implement custom read/write/skip functions for each data source, increasing initial setup complexity and boilerplate code.
The author explicitly rejects semantic versioning, stating it provides a false sense of security, which can lead to uncertainty about compatibility between releases.
No integrated build system; users must manually add cmp.c and cmp.h to their project, which might be cumbersome for teams accustomed to package managers or automated builds.