zenoh_unstable library

Dart bindings for Zenoh — the stable API plus the unstable/SHM surface.

Importing this library opts in to canon's unstable tier (Z_FEATURE_UNSTABLE_API / Z_FEATURE_SHARED_MEMORY). These APIs work as advertised but may change in a future release, mirroring canon's own unstable-feature contract.

This door is a strict superset of zenoh.dart (re-exported in full), so a consumer writes a single import. It requires the unstable native variant; selecting it and the resulting runtime gate are described in the README.

⛔ EVERY DIRECTIVE NAMING A src/ PATH ALLOW-LISTS. A bare export 'src/x.dart'; hands out every public declaration that file will EVER carry, so a helper added to it in some later unit joins this package's public API with nobody having decided that. A show clause makes the decision explicit and makes each addition to it a reviewable line.

⭐ THE ONE EXEMPTION IS THE LAST DIRECTIVE, AND IT IS BARE ON PURPOSE. export 'zenoh.dart'; inherits the stable door's own clauses — every name it hands out was already decided there, one reviewable line at a time. Repeating that list here would create a second place to forget, and the two copies would drift the first time the stable door changed. The eleven directives above it name a leaf library that allow-lists nothing itself, so for those the decision has nowhere else to live.

The lists are derived from the per-file public-declaration census (scripts/instruments/export_surface.dart), not written by hand, and are sorted the way combinators_ordering wants them: plain case-sensitive comparison, so uppercase sorts before lowercase.

Classes

AdvancedPublisher
A zenoh advanced publisher with cache, publisher detection, and sample miss detection capabilities.
AdvancedPublisherCacheOptions
Options for the advanced publisher's sample cache.
AdvancedPublisherOptions
Options for configuring an advanced publisher.
AdvancedSubscriber
An advanced subscriber with history recovery and miss detection.
AdvancedSubscriberOptions
Options for configuring an advanced subscriber.
AllocAlignment
An allocation alignment, expressed as a power of two.
AllocError
The request was well formed; the provider could not satisfy it.
AllocOk
The allocation succeeded; buffer is the memory canon handed back.
AllocResult
The outcome of an allocation on an ShmProvider.
Config
A Zenoh configuration.
DetectPublishersOptions
Options for detecting matching advanced publishers.
Encoding
Represents the encoding of a zenoh payload.
EntityGlobalId
A globally-unique identifier for a Zenoh entity (e.g. a queryable, publisher).
Hello
A hello message received during network scouting.
KeyExpr
A Zenoh key expression.
LayoutError
The request never became a layout the provider could act on.
LivelinessToken
A liveliness token that advertises the session's presence on a key expression for as long as it remains undeclared.
LogRecord
One log record emitted by zenoh's own runtime, delivered to a host sink.
MissEvent
Information about missed samples from a source.
Publisher
A zenoh publisher for efficiently publishing multiple messages on a single key expression.
PullQueryable
A queryable whose queries accumulate in a bounded channel, taken out on demand.
PullReplies
A bounded channel of query replies: replies accumulate and the caller takes them out on demand.
PullSubscriber
A zenoh pull subscriber: samples accumulate in a bounded channel and the caller takes them out on demand.
Querier
A zenoh querier for efficiently sending multiple queries on a single key expression with pre-configured options.
Query
A received query on a queryable key expression.
Queryable
A zenoh queryable that receives queries on a key expression.
RecvData<T>
The channel delivered a value.
RecvDisconnected<T>
The channel was dropped; nothing will ever arrive.
RecvEmpty<T>
The channel is alive; its buffer is empty right now.
RecvResult<T>
The outcome of a single tryRecv/recv on a bounded channel of T.
Reply
A reply received from a get operation, representing either a successful sample or an error.
ReplyError
An error payload returned by a queryable instead of a successful reply.
Sample
A sample received from a subscriber.
SampleChannel
The ReceivePort / StreamController pair behind every sample-carrying surface, plus the delivered-tracking that a retained payload needs.
Session
A Zenoh session.
ShmMutBuffer
A mutable shared memory buffer allocated from an ShmProvider.
ShmProvider
A shared memory provider for zero-copy data transfer.
Subscriber
A zenoh subscriber that receives samples on a key expression.
Timestamp
A zenoh timestamp: a 24-byte z_timestamp_t value.
ZBytes
A Zenoh byte payload.
ZBytesWriter
A zenoh bytes writer for assembling raw byte payloads.
ZDeserializer
A zenoh deserializer for reading structured payloads.
Zenoh
Top-level zenoh utilities.
ZenohFeatures
Runtime detection of which optional zenoh features the loaded native was built with.
ZenohId
A 16-byte zenoh entity identifier.
ZSerializer
A zenoh serializer for building structured payloads.

Enums

AllocErrorKind
Canon's allocation-error vocabulary, with canon's own wire values.
ChannelKind
Which bounded channel backs a pull handle — and therefore what happens when it fills up.
CongestionControl
Controls the behavior when the outgoing buffer is full.
ConsolidationMode
The consolidation mode for replies to a get query.
HeartbeatMode
Heartbeat mode for advanced publisher sample miss detection.
LayoutErrorKind
Canon's layout-error vocabulary, with canon's own wire values.
Locality
Restricts which peers an operation reaches, or accepts traffic from.
LogSeverity
Severity of a zenoh log record, and the ceiling a host sink installs at.
Priority
The priority of a zenoh message.
QueryTarget
The target of a get query.
ReplyKeyExpr
Which key expressions a query accepts replies on.
SampleKind
The kind of a sample (put or delete).
WhatAmI
The type of a zenoh entity (router, peer, or client).

Extensions

AdvancedSession on Session
Advanced pub/sub declaration on Session — the unstable door.
ShmBytes on ZBytes
Shared-memory introspection on ZBytes — the unstable door.

Exceptions / Errors

ZenohException
Exception thrown when a zenoh operation fails.