forked from cbor/cbor.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
impls.html
399 lines (252 loc) · 20.7 KB
/
impls.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
---
layout: default
title: Implementations
---
<div class='jumbotron'>
<h2>Implementations</h2>
<p class='lead'>
CBOR is simple enough to implement from scratch for a specific application.
<br>
For applications where that is not desirable, generic implementations are available for a variety of platforms.
Many of these implementations stay private, but some are published with liberal open-source licenses such as the Apache 2.0 or the MIT license.
<br>
Many implementations use a simple API of the form:
<br>
<code>encoded = CBOR.encode(data)</code>
➔
<code>data = CBOR.decode(encoded)</code>
</p>
</div>
<hr>
<div class='row-fluid'>
<div class='span4'>
<h2 id="javascript">JavaScript</h2>
<p>JavaScript implementations are available both for in-<a href="#browser">browser</a> use and for <a href="#nodejs">node.js</a>:</p>
<h3 id="browser">Browser</h3>
<p>A CBOR object can be installed via <code>bower install cbor</code> and used as an AMD module or global object in the browser e.g. in combination with Websockets…</p>
<p><a class="btn" href="https://github.com/paroga/cbor-js">View details »</a></p>
<h3 id="nodejs">node.js</h3>
<p>… and the server side for that might be written using node.js;
install via: <code>npm install cbor</code></p>
<p><a class="btn" href="https://github.com/hildjj/node-cbor">View details »</a></p>
<p>Also, an implementation based on the higher speed C library tinyCBOR is now available:</p>
<p><a class="btn" href="https://www.npmjs.com/package/tinycbor">View details »</a></p>
<p>cbor-sync provides an extensible CBOR encoder/decoder:</p>
<p><a class="btn" href="https://github.com/ARMmbed/cbor-sync">View details »</a></p>
<h3 id="duktape">Duktape</h3>
<p>A CBOR binding for both C and JavaScript:</p>
<p><a class="btn" href="https://github.com/svaarala/duktape/tree/master/extras/cbor">View details »</a></p>
<h2 id="dart">Dart</h2>
<p>A CBOR encoder/decoder suite with a test suite that incorporates
the encode/decode tests from RFC7049 and more is now available
in the <a href="https://pub.dartlang.org/packages/cbor">Darts package ecosystem</a>:</p>
<p><a class="btn" href="https://github.com/shamblett/cbor">View details »</a></p>
<h2 id="php">PHP</h2>
<p>API: <code>\CBOR\CBOREncoder::encode($target)</code> and <code>\CBOR\CBOREncoder::decode($encoded_data)</code></p>
<p><a class="btn" href="https://github.com/2tvenom/CBOREncode">View details »</a></p>
<p>
<code>Spomky-Labs/cbor-php</code> is a simple, fast and complete implementation of the specification:
it supports all major types and provides abstract classes to extend the library with, e.g., custom tags<br/>
The library is well tested and works from PHP7.3 and up, including PHP8
</p>
<p><a class="btn" href="https://github.com/Spomky-Labs/cbor-php">View details »</a></p>
<h2 id="perl">Perl</h2>
<p>Install a comprehensive implementation tailored to Perl's many
features via: <code>cpan CBOR::XS</code></p>
<p>You'll like the performance data…</p>
<p><a class="btn" href="http://pod.tst.eu/http://cvs.schmorp.de/CBOR-XS/XS.pm">View details »</a></p>
<p>Install a fast, simple implementation that supports
current Perl versions and whose license works well
with both open- and closed-source projects: <code>cpan CBOR::Free</code></p>
<p><a class="btn" href="https://metacpan.org/pod/CBOR::Free">View details »</a></p>
<p>Or, if you need pure Perl, try: <code>cpan CBOR::PP</code></p>
<p><a class="btn" href="https://metacpan.org/pod/CBOR::PP">View details »</a></p>
<h2 id="go">Go</h2>
<p>The newest Go implementation is fast, safe, and full-featured with API like JSON + toarray/keyasint struct tags:</p>
<p><a class="btn" href="https://github.com/fxamacker/cbor">View details »</a></p>
<p>Another full-grown Go implementation:</p>
<p><a class="btn" href="https://github.com/brianolson/cbor_go">View details »</a></p>
<p>A comprehensive, high-performance implementation as part of a larger set of data representation format en- and decoders:</p>
<p><a class="btn" href="https://godoc.org/github.com/ugorji/go/codec#CborHandle">View details »</a></p>
<h2 id="rust">Rust</h2>
<p>An implementation using
<a href="https://docs.serde.rs/serde/index.html">Serde</a>, a framework for
serializing and deserializing Rust data structures efficiently
and generically, is available on
<a href="https://crates.io/crates/serde_cbor">crates.io</a>. It is
maintained, but it does not support CBOR Tags, and the upstream
serde module has declined to add support:</p>
<p><a class="btn" href="https://github.com/pyfisch/cbor">View details »</a></p>
<p>The CBOR-CODEC implementation, available on
<a href="https://crates.io/crates/cbor-codec">crates.io</a>, supports Tags and can deal with objects without size limits:</p>
<p><a class="btn" href="https://gitlab.com/twittner/cbor-codec">View details »</a></p>
<p>The CBOR-RUST implementation has very little documentation, and
claims to be not ready for production:</p>
<p><a class="btn" href="https://github.com/franziskuskiefer/cbor-rust">View details »</a></p>
<p>The rust-cbor implementation works with Cargo and is on
<a href="https://crates.io/crates/cbor">crates.io</a>, but is considered unmaintained.
It does support CBOR Tags:</p>
<p><a class="btn" href="https://github.com/BurntSushi/rust-cbor">View details »</a></p>
<p><a href="https://crates.io/crates/cbor-diag"><code>cbor-diag</code></a>
is another parser targeted specifically at generating diagnostic
notation and annotated hex for debugging:</p>
<p><a class="btn" href="https://github.com/Nemo157/cbor-diag-rs">View details »</a></p>
<h2 id="swift">Swift</h2>
<p>A Swift implementation without a Foundation dependency (cross-platform ready):</p>
<p><a class="btn" href="https://github.com/myfreeweb/SwiftCBOR">View details »</a></p>
<p>Another, work-in-progress Swift implementation that is geared towards integration in iOS and macOS via Cocoapods:</p>
<p><a class="btn" href="https://github.com/Hassaniiii/CBORSwift">View details »</a></p>
<p>A Swift implementation fully setup for Swift's Codable Protocols for iOS, macOS, tvOS, and watchOS via Cocoapods, Carthage, or Swift Package Manager:</p>
<p><a class="btn" href="https://github.com/SomeRandomiOSDev/CBORCoding">View details »</a></p>
<p>PotentCodables bolsters the Swift Codable system with support for JSON, CBOR, and even ASN.1:</p>
<p><a class="btn" href="https://github.com/outfoxx/PotentCodables">View details »</a></p>
</div>
<div class='span4'>
<h2 id="lua">Lua</h2>
<p>Lua-cbor is a pure Lua implementation of CBOR for Lua 5.1—5.3, which
utilizes struct packing and bitwise operations if available:</p>
<p><a class="btn" href="https://www.zash.se/lua-cbor.html">View details »</a></p>
<p>“The most comprehensive CBOR module in the Lua universe”
supports everything mentioned in RFC 7049 and the extensions
registered with the IANA so far. It comes with parts implemented in C.</p>
<p><a class="btn" href="https://github.com/spc476/CBOR">View details »</a></p>
<p>lua-ConciseSerialization is a pure Lua implementation of CBOR with variants for both 5.1 and 5.3;
install via <code>luarocks install lua-conciseserialization</code>.</p>
<p><a class="btn" href="http://fperrad.github.io/lua-ConciseSerialization/">View details »</a></p>
<h2 id="python">Python</h2>
<p>Install an actively maintained, high quality implementation that
supports most CBOR tags, including those for representing cyclic
(recursive) references, via <code>pip install cbor2</code></p>
<p><a class="btn" href="https://pypi.io/project/cbor2/">View details »</a></p>
<p>Flynn's' simple API is inspired by existing Python serialisation
modules like json and pickle:</p>
<p><a class="btn" href="https://github.com/fritz0705/flynn">View details »</a></p>
<p>Flunn is a fork of flynn, fixing some compatibility issues and with some refactoring:</p>
<p><a class="btn" href="https://pypi.python.org/pypi/flunn">View details »</a></p>
<h2 id="ruby">Ruby</h2>
<p>A high-speed implementation has been derived from the
<a href="https://msgpack.org">MessagePack</a>
implementation for Ruby. Installation:
<code>gem install cbor</code></p>
<p><a class="btn" href="https://github.com/cabo/cbor-ruby">View details »</a></p>
<p>Ruby bindings for <a href="https://libcbor.readthedocs.io/">libcbor</a> are now available. Installation:
<code>gem install libcbor</code></p>
<p><a class="btn" href="https://github.com/PJK/libcbor-ruby">View details »</a></p>
<h2 id="erlang-elixir">Erlang, Elixir</h2>
<p>cbor-erlang is an early implementation in Erlang:</p>
<p><a class="btn" href="https://github.com/yjh0502/cbor-erlang">View details »</a></p>
<p>Based on an <a href="https://github.com/cabo/excbor">older Elixir implementation</a>, an
implementation with a modernized code base is now available:</p>
<p><a class="btn" href="https://github.com/scalpel-software/cbor">View details »</a></p>
<p>A recent Erlang implementation emphasizes features such as extensible tag support,
documentation, a larger test suite, a configurable depth limit, etc.:</p>
<p><a class="btn" href="https://github.com/galdor/erl-cbor">View details »</a></p>
<h2 id="haskell">Haskell</h2>
<!-- Is that one on Cabal yet? -->
<p>An early implementation has been on <a href="https://hackage.haskell.org/package/CBOR">hackage</a> for a while:</p>
<p><a class="btn" href="https://github.com/orclev/CBOR">View details »</a></p>
<p><a href="https://github.com/well-typed/cborg">cborg</a>, a more recent implementation, aims for higher speed and more
features, and comes with <a href="http://hackage.haskell.org/package/cbor-tool">tools</a> and a <a href="http://hackage.haskell.org/package/cborg-json">JSON
converter</a>. It is also the basis for the Haskell <a href="http://hackage.haskell.org/package/serialise">serialise</a> package:</p>
<p><a class="btn" href="http://hackage.haskell.org/package/cborg">View details »</a></p>
<h2 id="ocaml">OCaml</h2>
<p>The cbor package is a minimal and lightweight implementation of just the core CBOR data structures. It encodes and decodes to and from OCaml strings:</p>
<p><a class="btn" href="https://opam.ocaml.org/packages/cbor/">View details »</a></p>
<p>The orsetto package is a serialization framework that includes streaming encoders and decoders for both JSON and CBOR:</p>
<p><a class="btn" href="https://opam.ocaml.org/packages/orsetto/">View details »</a></p>
<h2 id="scala">Scala</h2>
<p>Idiomatic, lightweight and fast CBOR (de)serialization in Scala.
Zero dependencies, type-class based, easy to integrate.</p>
<p><a class="btn" href="https://github.com/sirthias/borer">View details »</a></p>
<h2 id="clojure">Clojure</h2>
<p><code>clj-cbor</code> is an extensible, native Clojure implementation of
the CBOR format:</p>
<p><a class="btn" href="https://github.com/greglook/clj-cbor">View Details »</a></p>
<h2 id="d">D</h2>
<p>A compact D implementation with a <a href="https://code.dlang.org/packages/cbor-d">Dub package</a>:</p>
<p><a class="btn" href="https://github.com/MrSmith33/cbor-d">View Details »</a></p>
<h2 id="crystal">Crystal</h2>
<p>Encoding and decoding library with a simple API inspired by the Crystal stdlib JSON package:</p>
<p><a class="btn" href="https://sr.ht/~arestifo/crystal-cbor/">View Details »</a></p>
<h2 id="julia">Julia</h2>
<p><code>CBOR.jl</code> is a Julia package for working with the CBOR
data format, providing straightforward encoding and decoding for
Julia types. Install via: <code>Pkg.add("CBOR")</code></p>
<p><a class="btn" href="https://github.com/saurvs/CBOR.jl">View details »</a></p>
</div>
<div class='span4'>
<h2 id="java">Java</h2>
<p>A Java implementation as part of the popular
<a href="https://github.com/FasterXML/jackson">Jackson</a> JSON library is
at:</p>
<p><a class="btn" href="https://github.com/FasterXML/jackson-dataformats-binary">View Details »</a></p>
<p>A Java 7 implementation focusing on test coverage and a clean
separation of model, encoder and decoder is at:</p>
<p><a class="btn" href="https://github.com/c-rack/cbor-java">View Details »</a></p>
<p>JACOB, a small CBOR encoder and decoder implemented in plain Java is at:</p>
<p><a class="btn" href="https://github.com/jawi/jacob">View Details »</a></p>
<p><em>borabora</em> supports graph queries and lazy decoding of stream elements:</p>
<p><a class="btn" href="https://github.com/noctarius/borabora">View Details »</a></p>
<p><em>Cyborg</em> supports a stream parsing/generation API without the need to adapt your data to a specific model:</p>
<p><a class="btn" href="https://github.com/dwaite/cyborg">View Details »</a></p>
<h2 id="c-java">C#, Java</h2>
<p>A rather comprehensive implementation that addresses arbitrary precision arithmetic is available in both a C# and a Java version.</p>
<p><a class="btn" href="https://github.com/peteroupc/CBOR">View details »</a></p>
<h2 id="c">C#, F#, VB.net</h2>
<p>Dahomey.Cbor is a high-performance CBOR serialization framework for .Net (C#, F#, VB.net):</p>
<p><a class="btn" href="https://github.com/dahomey-technologies/Dahomey.Cbor">View Details »</a></p>
<p>System.Formats.Cbor is the built-in solution for .Net (C#, F#, VB.net):</p>
<p><a class="btn" href="https://docs.microsoft.com/en-us/dotnet/api/system.formats.cbor?view=dotnet-plat-ext-6.0">View Details »</a></p>
<h2 id="c-c">C, C++</h2>
<p>A C implementation for highly constrained nodes, which achieves
a full CBOR decoder in 880 bytes of ARM code (and now also
includes an encoder), has been around for a while:</p>
<p><a class="btn" href="https://github.com/jimsch/cn-cbor">View Details »</a></p>
<p>A basic C++ implementation is also available:</p>
<p><a class="btn" href="https://github.com/naphaso/cbor-cpp">View Details »</a></p>
<p><a href="https://libcbor.readthedocs.io/">libcbor</a> provides a fully-fledged C99
implementation, including streaming and incremental processing functionality:</p>
<p><a class="btn" href="https://github.com/PJK/libcbor">View details »</a></p>
<p>TinyCBOR is Intel's industrial strength C/C++ implementation of
CBOR, as used in the <a href="https://www.iotivity.org/">IoTivity</a> framework:</p>
<p><a class="btn" href="https://github.com/01org/tinycbor">View details »</a></p>
<p><a href="https://github.com/nlohmann/json">JSON for Modern C++</a> — a header-only C++ library that aims to
promote JSON to a first-class data type in C++11 — now supports
CBOR as (de)serialization format.</p>
<p><a class="btn" href="https://github.com/nlohmann/json#binary-formats-cbor-and-messagepack">View details »</a></p>
<p><a href="https://github.com/getml/reflect-cpp">reflect-cpp</a> — A C++-20 library that
provides a unified reflection-based interface for various serialization formats,
including CBOR.</p>
<p><a class="btn" href="https://github.com/getml/reflect-cpp/tree/main/docs">View details »</a></p>
<p><a href="https://github.com/anton-dutov/cbor-qt">The old Qt
implementation</a> is now
deprecated, as Qt from version 5.12 now has built-in support:</p>
<p><a class="btn" href="https://doc.qt.io/qt-5/qcborvalue.html">View details »</a></p>
<p>GoldFish is a fast, header-only C++11 library for CBOR and JSON
that minimizes memory allocation by providing a SAX-like, but pull-oriented interface.
Currently only ported to Visual C++.</p>
<p><a class="btn" href="https://github.com/OneNoteDev/GoldFish">View details »</a></p>
<p>jsoncons is a C++11, header-only library for JSON construction that supports encode to/decode from CBOR.</p>
<p><a class="btn" href="https://github.com/danielaparker/jsoncons">View details »</a></p>
<p>CBOR-lite is a simple Modern C++ header-only implementation
designed for encoding and decoding of CBOR-based application
level-protocols.</p>
<p><a class="btn" href="https://bitbucket.org/isode/cbor-lite">View details »</a></p>
<p>cborg seems to be a popular name for a CBOR implementation, here for C++ with a fluent interface:</p>
<p><a class="btn" href="https://github.com/ARMmbed/cborg">View details »</a></p>
<p>A simple low-level streamed callback-based CBOR push parser in C and C++:</p>
<p><a class="btn" href="https://github.com/vi/simple_cbor_stream_parse">View details »</a></p>
<p>A basic C++ implementation heavily based on C++17 variants:</p>
<p><a class="btn" href="https://github.com/rantydave/cppbor">View details »</a></p>
<p>Not exactly a coder/decoder per se, but more type based compile
time encoder/decoder generator that uses CBOR as one of
underlying protocols:</p>
<p><a class="btn" href="https://github.com/serge-klim/bobl">View details »</a></p>
<p>A "zero-memory-footprint" C decoder in use on some microcontroller/IoT deployments with no memory allocation:</p>
<p><a class="btn" href="https://github.com/quartzjer/cb0r">View details »</a></p>
<p>Qcbor is a full implementation of CBOR in highly portable
C. Commercial quality with measures for software security, small
code size, a test suite and documentation.</p>
<p><a class="btn" href="https://github.com/laurencelundblade/QCBOR">View details »</a></p>
</div>
</div>