weida

GitHub crates.io

Library parity documents

Rendered from docs/libraries/README.md at 92c768a

Contents
  1. A library document is not a research sheet
  2. Required sections
  3. Documents

This directory documents the six foreign-protocol libraries with their bindings — ZeroMQ, nanomsg/NNG, MQTT 5, AMQP 1.0, Core NATS and HTTP — plus weida's own C ABI (weida-c.md), the Python package on it (weida-py.md), the JavaScript package on it (weida-js.md), the JVM and Android package on it (weida-jvm.md), the Erlang and Elixir package on it (weida-beam.md), the Go package on it (weida-go.md) and the Swift package on it (weida-swift.md), and the OpenBao companion crate (weida-openbao.md). Each foreign protocol is a standalone library, a crate usable with no weida in the picture (0013 §4, §4.7). Its document is the parity table: it states, row by row, what the library does with every inventory item of the protocol's reference implementation.

A library document is not a research sheet

The documents answer different questions:

docs/research/<proto>.mddocs/libraries/<proto>.md
Subjectthe upstream protocol and implementationsthis repository's standalone library
Questionwhat does the protocol specify and what do real peers dodoes this implementation cover the reference inventory
Vocabularythe foreign protocol's onlythe foreign protocol's public API and this library's implementation
Verdictssourced fact or named open questionpresent, refused with a reason, or absent with a reason

The repository defines no global mapping between a foreign protocol and weida patterns. Applications may compose the public libraries explicitly. Future broker integration is documented by the schema of one managed Connector resource and its concrete conversion policy, not by a protocol-wide equivalence table.

Required sections

Every parity document answers all of these, in this order. A section that does not apply says so in one line rather than being omitted.

# <Protocol> (<reference implementation and version>) — feature parity

## 1. What a row means
The three verdicts, the rule against "partial", and the versions every measured claim was
measured against.

## 2. <Primitive> types
Every socket/link/channel kind of the reference implementation's own table, with the rows that
table has, and where each one is implemented or why it is absent.

## 3. Transports
Every transport the sheet inventories, present or absent-with-reason.

## 4. Mechanisms and authentication
Every security mechanism, and the authentication dialog if the protocol has one.

## 5. Options
Every configuration option of the reference implementation, honoured under the name this
library gives it or refused with the reason.

## 6. Observability
The event set, counters or tracing surface, and what a row's value carries where it differs.

## 7. Devices and helpers
The intermediaries the reference implementation ships as API.

## 8. Interop evidence
Which implementations were run against this one, in which roles, how many pairings, and what
disagreed — each disagreement measured rather than inferred.

## 9. Deliberate deviations and bounds the reference implementation lacks
Where this library is on purpose not identical, and every ceiling it adds.

## 10. The definition of done
The clauses this library was built against, each with its verdict and the section that proves
it.

## 11. Sources
The research sheet with section numbers, the decisions, and the code paths the table's
verdicts were read from.

Two rules keep these documents honest:

  1. Every row carries its evidence. A "present" row names the module or the test; a "refused" row names the reason the code gives at configuration time; an "absent" row names what is missing. A row whose verdict cannot be checked from the repository does not belong here.
  2. No aggregate verdicts. "Mostly complete", "partial support" and "planned" are not verdicts. Either the row is present, or the document says what a caller who wants it does not get.

Documents

FileLibrary cratesReference implementationSheetStatus
zmq.mdweida-zmtp (codec), weida-zmq (implementation)libzmq 4.3.5, plus the pure-Rust zeromq 0.6.0zeromq.mdcomplete against 0013 §4.7's six clauses
zmq-py.mdweida-py-core (the shared PyO3 foundation), weida-zmq-py (the binding)pyzmq 27.2.0 over libzmq 4.3.5zeromq.mdcovers: all eleven socket types, the three transports, the 98-row option table, PLAIN/CURVE/ZAP with a handler in Python, the monitor, the devices, and a synchronous surface beside the asyncio one. Does not cover: zmq.STREAM and the DRAFT socket types, zmq.Poller/sock.fd, send_string/send_json/Frame, pyzmq's zmq.auth policy framework, and concurrent send and recv on one socket — see §9.1, which is the library's &mut self and is filed against weida-zmq
nng.mdweida-sp (codec), weida-nng (implementation)NNG 1.4.0-rc.0, through the nng crate 1.0.1nanomsg-nng.mdcomplete against 0013 §4.7's six clauses, read for SP
nng-py.mdweida-py-core (the shared PyO3 foundation), weida-nng-py (the binding)pynng 0.9.0 over NNG 1.11.0 — a second C release beside the Rust suite's 1.4.0-rc.0, which §1 states per claimnanomsg-nng.mdcovers: all eleven protocol classes and three context classes, tcp/ipc/inproc, the 50-row option table with 34 honoured and 16 refused by name, 23 client failures as exception classes, six interop pairings against pynng, and a synchronous surface over weida-nng's blocking feature. Does not cover: tls+tcp (the library has the transport, this surface has no certificate API), raw sockets and nng_device, pipe callbacks and per-endpoint options; the wheel is built and run with no Rust toolchain by package.sh, as for every other binding (§10)
mqtt.mdweida-mqtt-codec (codec), weida-mqtt (client)rumqttd 0.20.0 and rmqtt 0.23.1mqtt5.mdcomplete against 0013 §4.7's six clauses, read for MQTT. Its protocol is asymmetric: it is a client, a server is a broker (0014 §2), and §0 draws that line before the first row so a reader learns why there is no server column
mqtt-py.mdweida-py-core (the shared PyO3 foundation), weida-mqtt-py (the binding)paho-mqtt 2.x as the documented reference, not pinned and not run; measured against rumqttd 0.20.0mqtt5.mdcovers: connect with 19 keyword options each honoured or refused by name, the session, publish returning a Completion, subscriptions as iterators of Delivery, all four CONNACK-declared limits readable, 51 exception classes (36 reason codes plus 14 without a byte plus the base), and a synchronous surface sharing every value class with the asyncio one. Does not cover: TLS — absent by construction, the library takes the caller's rustls::ClientConfig and is_encrypted is always False (§3, §9.1) — WebSockets, multi-step AUTH from Python, paho's loop* family, and interop against paho itself, which §10 records as not met
amqp.mdweida-amqp-codec (codec), weida-amqp (client)fe2o3-amqp 0.18.4, the pure-Rust peer, through its acceptor; RabbitMQ 4.x not run, its binary absentamqp10.mdcomplete against 0013 §4.7's six clauses, read for AMQP. Covers: all nine performatives, all nine message sections, both credit schemes, the settle modes and the five delivery states, ANONYMOUS/PLAIN/EXTERNAL and both routes to TLS. Does not cover: Part 4 transactions, link resumption, any interpretation of the three filter families (the field is carried), the WebSocket binding, and a broker — the standard defines no node model
amqp-py.mdweida-py-core (the shared PyO3 foundation), weida-amqp-py (the binding)python-qpid-proton 0.40.0; the interop peer is fe2o3-amqp 0.18.4amqp10.mdcovers: connection, session and link as objects, await send returning the delivery's terminal state, an async iterator of deliveries with all seven section accessors, credit granted explicitly, 28 conditions plus 17 client failures as exception classes, and a synchronous surface beside the asyncio one. Does not cover: TLS - the library takes the caller's rustls::ClientConfig, which has no Python spelling and is filed rather than guessed at (§9.5) - Proton's container and handler classes, the AMQP type wrappers, Part 4 transactions, and a listener
nats.mdweida-nats-codec (codec), weida-nats (client)async-nats 0.50 as the peer, through a nats-server that is not available: interop is written and #[ignore]d, not runnats.mdfive of 0013 §4.7's six clauses met; clause 6, a parity table backed by interop, is explicitly not met and says so, because nats-server is absent and async-nats is a client rather than a substitute for one. Covers: all twelve verbs, both wildcards, queue groups, request-reply over an inbox with the 503 kept distinct from a timeout, all five credential forms, TCP and TLS. Does not cover: JetStream, a reconnect loop, the WebSocket transport, UNIX-domain sockets, and any cryptographic implementation of NKey or JWT signing — the caller supplies a closure
nats-py.mdweida-py-core (the shared PyO3 foundation), weida-nats-py (the binding)nats-py 2.15.0nats.mdcovers: connect with 29 keyword options, each honoured or refused by name, publish with headers, subscriptions as async iterators with the sid and the NATS/1.0 status readable, queue groups asserted on the wire, unsubscribe_after, request with a mandatory timeout, request_many, the 503 as its own class beside the timeout, 25 client failures as exception classes, and a synchronous surface nats-py does not have at all. Does not cover: TLS - the library takes the caller's rustls::ClientConfig, which has no Python spelling (§8.5) - JetStream, nats.micro, push callbacks, drain, a server pool and any reconnect loop. Interop is not met: nats-server is absent, so the two tests that need one are skipped
http.mdweida-http-codec (codec), weida-http (client and server)hyper 1.12.0 (HTTP/1.1, HTTP/2) and h3 0.0.8 on h3-quinn 0.0.10 (HTTP/3), all run in both roles; curl 8.23.0 as a smokehttp.mdcomplete against 0013 §4.7's six clauses. Covers: HTTP/1.1, HTTP/2 over TLS by ALPN and HTTP/3 over QUIC (feature h3), client and pull-style server, chunked bodies, trailers, 100-continue, pipelined answers, flow control, GOAWAY, credentials never compressed or printed. Does not cover: redirects, cookies, content coding, proxies, Alt-Svc, h2c, server push, CONNECT/Upgrade/WebSocket, the QPACK dynamic table (0044 §6), and a Python binding (B-371)
weida-c.mdweida-c (libweida and weida.h)none — this is weida's own ABI, so the reference is the Rust API of crates/weida it binds (0045)none; the normative contract is docs/c/covers the first stage and the config, refusals, streams, stats, drain, binding lifecycle, local transports, identity, resolver, patterns (Push/Pull, Pub/Sub, PAIR, SURVEY, BUS and RADIO/DISH), cursors, flows, raw peers and swarm areas: an owned runtime with its full configuration (limits, guarantee set, redial policy, outbox), TLS values with pins and an ALPN token, identity and trust sources (a value, ephemeral, driven from outside, a reloaded directory) with their events as a queue, QUIC, in-process, AF_UNIX and named-pipe bindings with the peer principal the kernel proved, streamed Req/Rep (accept and request at the header, bodies read and written like sockets, collect with a ceiling), request metadata and trace context, refusals with a typed error code and the requester's cancellation, exchanges opened with a streamed request body and the reply awaited on its own handle, connection statistics, the runtime's counters, connection numbers and peer events as a queue, a bounded drain that reports what it delivered, a binding's close, hand-over to a successor process and disconnect of a peer, serving through a relay and serving one, a resolver whose lookups are read from a queue and answered, Push/Pull and Pub/Sub with streamed fan-outs, drop counts by topic and the sequence gap, PAIR, SURVEY with its deadline and late count, BUS, RADIO/DISH with layered and datagram segments, drops by dish and eviction by key, cursors as queues (report orders in the transfer metadata, the sender's cursor sets read like events, the receiver's reporter with its granularity), transfer priority and deadlines, datagram flows (a raw peer's open_flow and an acceptor's flows, sent without waiting and received as a queue, with their counters and path), raw peers (one-way streams, exchanges, outbox sends and segments to the next dialled peer, an acceptor's arrivals as a tagged handle, a queue's consumers with delivery and close, and their credit grants), SWARM (seeders answering each fetch's orders from the caller's storage, swarms fetching one blob from every seeder with each piece verified against its root, and the piece tree's values), delivery receipts, readiness descriptors and weida_poll, 29 status codes with a thread-local record, EINTR. No area of 0045 §5 is absent
weida-py.mdweida (the Python package crates/py/weida-py, cffi over libweida)the C ABI it mirrors, weida-c.mdnonecovers what the C ABI covers, its first stage, client keys, anchors and the presented chain, and its config, refusals, streams, stats, drain, binding lifecycle, local transports, identity, resolver, patterns, cursors, flows, raw peers and swarm areas: an owned runtime with its full configuration (limits, guarantee set, redial policy, outbox) as keyword value classes with IntEnum enumerations, Req/Rep with request metadata, trace context, priority and transfer deadlines, refusals with an ErrorCode and the requester's cancellation, exchanges whose request body is streamed while the reply is read (Requester.open, ReplyStream), connection statistics as frozen records, the runtime's two counters, connection numbers and peer events (a queue, iterable and async for), a drain that reports what reached the peer (Runtime.drain, a frozen Drained), a binding's close, hand-over to a successor and take-over, disconnect by key, serving through a relay and serving one (Listener.relay, admission with a budget), unix and named-pipe bindings with the peer's kernel-proved principal (IncomingMeta.peer_local), identity and trust sources with their events (a queue) and the ALPN token, a resolver callable answering each lookup on a daemon thread, or a coroutine function on the running loop, Push/Pull and Pub/Sub with streamed fan-outs, drop counts by topic (a frozen TopicDrops) and the sequence gap (IncomingMeta.gap), PAIR, SURVEY (answers as bytes, the window in seconds) and BUS, RADIO/DISH with layered and datagram segments (a frozen Received, drops per dish as frozen DishDrops, IncomingMeta.segment and .layer), cursors (TransferMeta(report=..., report_mode=...), the sender's queue of cursor sets as tuples of frozen CursorEntry, iterable and async for, and the receiver's Reporter), datagram flows (Runtime.peer and Peer.open_flow with a FlowMeta, Listener.acceptor handing out a frozen Incoming tagged by IncomingKind, a Flow whose send never waits, the receiver's IncomingFlow a queue of bytes, iterable and async for, the counters as frozen FlowStats and IncomingFlowStats and the path as a frozen PathStats), raw peers (Peer.open, .open_bi, .send and .segment to the next peer, an acceptor's arrivals as one frozen Incoming tagged by IncomingKind, a queue's Consumer and its credit), SWARM (Listener.seeder handing out a SeedSession that answers each fetch's orders from the caller's storage, Runtime.swarm and Swarm.fetch with keyword options, a Fetch that is a queue of verified frozen Pieces, iterable and async for, and the piece tree's values Blob, PieceList, TreeHasher, Bits and blob_id_of), streamed transfers and receipts, identity, trust and TLS, as classes with a synchronous surface (timeouts in seconds, Ctrl-C through EINTR) and weida.asyncio (descriptors on the running loop, cancellation), 30 exception classes, one py3-none-<platform> wheel, tested on CPython 3.13 and 3.14, free-threaded 3.14t and PyPy 3.11 on linux-amd64, linux-arm64, darwin-arm64 and windows-amd64. Absent: 3.13t unrun; published to pypi.org by every v* tag
weida-js.mdweida (the npm package crates/js/weida-js, a Node-API addon in C over libweida)the C ABI it mirrors, weida-c.mdnonecovers what the C ABI covers, the full runtime configuration, refusals, streamed exchanges, connection statistics, peer events (an async iterator), drain, a binding's close, hand-over and disconnect, relay serving, unix and named-pipe bindings with the peer's kernel-proved principal, identity and trust sources with their events (an async iterator) and the ALPN token, a resolver function answering each lookup on the JS thread, Push/Pull and Pub/Sub with streamed fan-outs, drop counts and the sequence gap, PAIR, SURVEY and BUS, RADIO/DISH with layered and datagram segments, cursors (an async iterator of cursor sets and a reporter), datagram flows (a raw peer's openFlow, an acceptor's flows read as an async iterator), raw peers (one-way streams, exchanges, sends and segments to the next peer, an acceptor's tagged arrivals, a queue's consumers and their credit), and SWARM (seeders, fetches as async iterators of verified pieces, the piece tree's values) included, as classes with a Promise per waiting method, { signal } for cancellation and timeouts, one waiter thread polling the readiness descriptors, one WeidaError class carrying the R9 code name and the thread-local record, one package with libweida beside the addon, run under Node 26, Bun 1.4.4 and Deno 2.9.8 on linux-amd64, linux-arm64, darwin-arm64 and windows-amd64. Absent: whatever the C ABI lacks; published to npmjs.org by every v* tag
weida-jvm.mdnet.doodleshnookie.weida (the Java package crates/jvm/weida-jvm, one JNI library in C over libweida for the desktop JVM and Android)the C ABI it mirrors, weida-c.mdnonecovers what the C ABI covers, as AutoCloseable classes with a CompletableFuture and a blocking twin with a timeout per waiting method, cancellation through the future, one waiter thread polling the readiness descriptors, one WeidaException carrying the R9 code as an enum and the thread-local record, a jar with the native libraries beside it, run on Temurin 25 on linux-amd64 and linux-arm64; the JNI library cross-built for the four Android ABIs and the Java sources compiled against API 24. Absent: whatever the C ABI lacks, a run on Android, an AAR, macOS and Windows unrun, Maven Central
weida-beam.mdweida (the OTP application crates/beam/weida, a NIF in C over libweida, used from Elixir as :weida)the C ABI it mirrors, weida-c.mdnonecovers what the C ABI covers, as one function per C function with a timeout on every waiting one, no NIF call blocking a scheduler, readiness through enif_select into the waiting process's mailbox with a FIFO of waiters per handle, {error, Map} carrying the R9 code as an atom and the thread-local record, handles released by drop/1 or the garbage collector, run on Erlang/OTP 29 and Elixir 1.20 on linux-amd64. Absent: whatever the C ABI lacks, an Elixir wrapper module, macOS and Windows, hex
weida-go.mdweida (the Go module crates/go/weida, cgo over a statically linked libweida)the C ABI it mirrors, weida-c.mdnonecovers what the C ABI covers, as one type per handle with a context.Context on every waiting method, no call blocking in C, the readiness descriptor parked in Go's netpoller with one duplicate per waiting goroutine, io.Reader and io.Writer on the transfers, *Error carrying the R9 code and the thread-local record with one sentinel per code for errors.Is, handles released by Close or a cleanup, libweida.a linked into the binary, run on Go 1.27 on linux-amd64 and linux-arm64. Absent: whatever the C ABI lacks, macOS and Windows unrun, a tagged module release
weida-swift.mdWeida (the Swift package crates/swift/weida, over the XCFramework CWeida of a statically linked libweida)the C ABI it mirrors, weida-c.mdnonecovers what the C ABI covers, as one class per handle with async throws on every waiting method, no call blocking in C, the readiness descriptor watched by a one-shot DispatchSource per waiting task over a duplicate of its own, task cancellation dropping the op, WeidaError carrying the R9 code and the thread-local record, Security's SecCertificate and SecKey for key material, run on macOS on darwin-arm64, built and linked for iOS devices and the simulator. Absent: whatever the C ABI lacks, iOS unrun, a published XCFramework, Linux and Windows
weida-openbao.mdweida-openbao (client and identity sources)not a foreign protocol: OpenBao 2.6.0's HTTP API, exercised by tests/io/bao_dev.rs against the local binary in dev mode; the scripted tests in the gatenone; the decision is 0032covers: token, AppRole and the wrapped hand-off with theft detection, token renewal, PkiSign over the local key with renewal, PkiAnchor, Kv, post_wrapped/revoke_accessor for a controller. Does not cover: pki/issue (refused by decision), revocation checks, a Python surface

Every binding this repository ships has its document above; there is no planned entry.