You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge spike/transport-byte-channel: JSONB + tree-presentation orthogonality + transport refactor
Brings into main the 10 commits that were on the spike branch:
- spike(transport): Validate three-layer architecture (IByteTransport + ITransact)
- refactor(transport): Promote layered transport to production
- chore(transport): Remove spike scaffolding
- feat(transport): JSONB wire format + tree/streaming presentation orthogonality
- test: JSONB wire-format + tree-presentation host coverage
- test(hil): promote JSONB spike fixtures to serial + I2C suites
- chore(avr): refresh binary-size baselines for the transport refactor
- docs: JSONB wire format, tree/streaming presentation, composition
- ci: recover coverage thresholds + nice host compiles
- docs: drop stale 'transport buffer' terminology + fix ctor conflation
The spike is the primary direction; main becomes the active branch.
Copy file name to clipboardExpand all lines: README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,6 +113,21 @@ TODO - let's mention that it can work with zero heap.
113
113
114
114
[C++ version compatibility matrix](./docs/cpp-version-compatibility.md) — what's available on C++17, what unlocks on C++20/23.
115
115
116
+
## Composition: three orthogonal axes
117
+
118
+
The library exposes three independent choices that compose freely. The typed API surface looks the same in every combination — pick each axis where it makes sense for your target, mix and match without changing call-site code.
1. **Wire format** — JSON text or JSONB binary opcodes (`-DNOTE_JSONB=1`). Smaller payloads on bandwidth-sensitive links; the typed API at the call site is byte-identical between the two.
126
+
2. **Response presentation** — *streaming* (SAX events directly into your typed `Response` and `.into(struct)` sinks; no tree held in memory) or *tree* (a `JsonBackend` assembles a walkable `JsonReader` you can query by key after the call). Picked by which `Notecard` constructor you call.
127
+
3. **Binary payload** — `card.binary.put()` / `.get()` and large note bodies use a COBS-framed binary channel alongside the JSON/JSONB request channel. Works in every cell of the first-two-axes matrix.
128
+
129
+
The four combinations of wire format × presentation — JSON×streaming, JSON×tree, JSONB×streaming, JSONB×tree — all have host-side and on-device coverage. See [`docs/composition.md`](docs/composition.md) for the full matrix and the configuration-by-configuration breakdown, and [`examples/stdcpp/wire-format-and-presentation.cpp`](examples/stdcpp/wire-format-and-presentation.cpp) for a runnable demo where the same `demo()` body walks all four cells.
130
+
116
131
## How it scales
117
132
118
133
The library is built to scale from resource-constrained MCUs to desktop-class hardware. The same API surface can be used from ATmega328P (32 KB flash / 2 KB RAM) up to ESP32, Cortex-M, and desktop hosts. For additional optimization, you dial resource use by choosing how much of the stack to pull in.
|[env-vars.cpp](../examples/stdcpp/env-vars.cpp)| All four env.get modes: single, multi-into-struct, all, change-polling |
86
+
|[streaming-and-tree.cpp](../examples/stdcpp/streaming-and-tree.cpp)| Streaming vs tree response presentation with `body()` / `.into()` patterns |
87
+
|[wire-format-and-presentation.cpp](../examples/stdcpp/wire-format-and-presentation.cpp)| The wire × presentation matrix end to end — same demo() runs in all four cells |
0 commit comments