@@ 4,8 4,33 @@ A library to encode and decode bare messages, as described in
# How it works (right now)
Until I've implemented a proper API for this, I'll just explain a little about
lisp-binary, which `cl-bare` heavily relies
on. [lisp-binary](https://github.com/j3pic/lisp-binary) defines a small DSL,
`defbinary` which sort-of works like the `defstruct` in common lisp.
For each binary type we define we get these functions (assume type is uint):
Using these we can compose different aggregated types based on a (to come) schema.
;; Assume we have two types, 'uint' and 'u8'
(let ((x (make-uint :value 31231))
(y (make-u8 :value 2)))
(print (uint-value x))
(print (u8-value y)))
If read from stream we can chain them together, and read and write.
- real API
- tagged union