1[![Build Status](https://travis-ci.org/cabo/cn-cbor.png?branch=master)](https://travis-ci.org/cabo/cn-cbor) 2 3# cn-cbor: A constrained node implementation of CBOR in C 4 5Below is the original README for cn-cbor, a Proof of Concept 6implementation of [CBOR](https://cbor.io) that I wrote in 2013. 7People have been sending me fixes and updates to make this 8implementation more useful for actual use, and for a while I have 9occasionally integrated them. Jim Schaad now is so far ahead of this 10repo that you are most likely better off using [his 11repo](https://github.com/jimsch/cn-cbor) as your upstream. 12 13If you *are* here looking for experimental CBOR implementations for 14constrained nodes, there are many, some of which are listed at 15[cbor.io](https://cbor.io/impls.html). One more: I have recently 16[extracted](https://github.com/cabo/bm_cbor) the implementation from 17ARM-mbed's [SUIT manifest 18generator](https://github.com/ARMmbed/suit-manifest-generator) (Apache 192.0). SUIT implementers report (CBOR-specific) code sizes in the low 20hundreds of bytes. Thank you, [ARM](https://github.com/bremoran). 21 22# cn-cbor: A constrained node implementation of CBOR in C 23 24This is a constrained node implementation of [CBOR](http://cbor.io) in 25C that I threw together in 2013, before the publication of 26[RFC 7049](http://tools.ietf.org/html/rfc7049), to validate certain 27implementability considerations. 28 29Its API model was inspired by 30[nxjson](https://bitbucket.org/yarosla/nxjson). It turns out that 31this API model actually works even better with the advantages of the 32CBOR format. 33 34This code has been used in a number of research implementations on 35constrained nodes, with resulting code sizes appreciably under 1 KiB 36on ARM platforms. 37 38I always meant to improve the interface some more with certain API 39changes, in order to get even closer to 0.5 KiB, but I ran out of 40time. So here it is. If I do get around to making these changes, the 41API will indeed change a bit, so please be forewarned. 42 43## Building 44 45There is a `Simple-Makefile` for playing around, as well as a complete 46[`cmake`](http://www.cmake.org)-based build environment. 47(You can choose what fits your needs better.) 48 49Building with `cmake`: 50 51 ./build.sh 52 53Building including testing: 54 55 ./build.sh all test 56 57Generating a test coverage report (requires lcov[^1]; result in `build/lcov/index.html`): 58 59 ./build.sh all coveralls coverage_report 60 61License: MIT 62 63[^1]: Installation with homebrew: `brew install lcov` 64