Section : 1 Updated : Jan 19, 2023 Source : 0.7 Note : libcbor NAMElibcbor − libcbor Documentation Documentation for version 0.7.0, updated on Jan 19, 2023. OVERVIEWlibcbor is a C library for parsing and generating CBOR, the general−purpose schema−less binary data format. Main features • Complete RFC conformance [1]• Robust C99 implementation • Layered architecture offers both control and convenience • Flexible memory management • No shared global state − threading friendly [2]• Proper handling of UTF−8 • Full support for streams & incremental processing • Extensive documentation and test suite • No runtime dependencies, small footprint [1]See RFC conformance[2]With the exception of custom memory allocators (see Memory management and reference counting)CONTENTSGetting startedPre−built Linux packages are distributed from the libcbor website. OS X users can use Homebrew: brew tap pjk/libcbor
brew install libcbor
For other platforms, you will need to compile it from source. Building & installing libcborPrerequisites: • C99 compiler • CMake 2.8 or newer (might also be called cmakesetup, cmake−gui or ccmake depending on the installed version and system)• C build system CMake can target (make, Apple Xcode, MinGW, ...)NOTE: As of May 2015, not even the 2015 release candidate of Visual Studio supports C99. While CMake will be happy to generate a VS solution that you can play with, libcbor currently cannot be compiled using the MSVC toolchain. ICC, GCC under Cygwin, and MinGW's GCC will all work. The MinGW build process is described below. Configuration optionsA handful of configuration flags can be passed to cmake. The following table lists libcbor compile−time directives and several important generic flags.