v0.7.0
Added
- An
idl/layer, which brings microser back as a message encoder for a
channel's payload.microser.his the runtime, a header-only reader and
writer for tagged fields, andmicroser-gen.shcompiles an.idlfile into
a C struct with an encode and a decode function. The core still names neither
a socket nor a serialiser: netchan moves opaque bytes, and this says what
they mean. - A dispatch table generated from the same
.idl, so a program routes an
incoming datagram to a typed handler instead of switching on a tag itself. A
channel'scontent_typeis the topic, read back from its OPEN, so a channel
can be routed before a byte of payload is read. - A manual, built by
docs/build.shinto one self-contained page and deployed
to GitHub Pages on a push to main. The prose is hand written, the API
reference is generated fromsrc/netchan.h, andcheck-symbols.shfails the
build if the prose calls anetchan_function the header no longer declares.
Diagrams are rendered to SVG at build time by mscgen and graphviz, with their
colors swapped forcurrentColorso one file serves light and dark.
Fixed
- The IDL compiler folded two variant fields sharing a tag number into a single
struct member, so a union that reused a number generated code that did not
compile. Every variant field now gets its own member and its own decode case.
The field-number check also compared only plain fields against each other, so
a plain field colliding with a variant or with the discriminant reached the C
compiler as a duplicate case value. The full field set is checked now, and a
collision is reported by name. - A generator run with no output base wrote empty
.cand.hfiles. The
guard was inBEGIN, whereexitstill runsEND. It is inENDnow,
whereexitis terminal. - The chat server polled a peer it had just freed.
Changed
- The IDL compiler and the API-reference generator moved out of shell
single-quoted strings intomicroser-gen.awkandgen-api.awk, invoked with
awk -f. Every apostrophe and quote in them was a quoting hazard, and one
such apostrophe had already spilled part of the program to the shell. As
ordinary source files they parse-check and passgawk --lint. Generated
output is unchanged. A vendored copy needs both files of each pair.
Vendoring
curl -fsSL https://raw.githubusercontent.com/OrangeTide/netchan/v0.7.0/tools/vendor.sh | sh -s -- --version v0.7.0The source snapshot below is what that fetches. See
VENDORING.md.