1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//! Executable form of the keyspace-v2 convention.
//!
//! The convention is specified in `rfcs/` (v1). This crate is
//! its enforcement layer: everything a producer or consumer needs to emit and
//! parse conforming keys without ever spelling a raw key string.
//!
//! Canonical grammar (base-relative — the deployment base is the session
//! *namespace*, RFC 03 §1.1, so no key built here contains it):
//!
//! ```text
//! v1/<origin>/<class>/<producer>/<subject...>
//! ```
//!
//! Layer map:
//! - [`key`] — [`Key`]/[`Selector`]/[`Chunk`]: validated key value types over
//! `zenoh_keyexpr::OwnedKeyExpr` (RFC 08 §1.2).
//! - [`grammar`] — chunk lexical rules, reserved tokens, structural key
//! assembly and parsing (RFC 03).
//! - [`origin`] — `h-<12hex>` host-origin minting (RFC 06 §1).
//! - [`profile`] — the application profile: app name + origin salt, the two
//! constants an adopting application declares (RFC 06 §1, RFC 11 §4).
//! - [`slug`] — canonical, injective slugging of foreign values (RFC 03 §2).
//! - [`qos`] — the five named QoS profiles (RFC 04 §3).
//! - [`context`] — [`V1Context`]: origin + producer; producers build all
//! framework keys through it.
//! - [`slice`] — [`RegistrySlice`], the `introspect` reply type + diff
//! (RFC 08 §6).
//!
//! The subject vocabulary itself is governed by the registry (RFC 08). It is
//! **application-owned**: each application checks its `registry/*.toml` into
//! its own repository and generates typed subject builders/parsers from them
//! with the `zenkey-build` crate in its build script. This crate ships no
//! registry.
//!
//! The RFC's design properties D1–D6 are pinned as executable guard tests in
//! `tests/guard.rs` — run by CI, as RFC 03 §4 requires.
//!
//! # Note on the deployment base
//!
//! There is deliberately no base constant in this crate. The base is the value
//! a deployment sets as its Zenoh session **`namespace`**, which prefixes it
//! onto every keyexpr the session emits, strips it on delivery, and *filters*
//! ingress from outside it — an isolation boundary, not a string convention
//! (RFC 09 §0). The only legitimate readers are session configuration,
//! router-side artifacts (storage selectors, ACL rules), and deliberately
//! un-namespaced debug tools (`zenctl`). Application code that reaches for a
//! base to *build a key* has made a mistake: the session adds the base.
pub use CommonState;
pub use V1Context;
pub use ;
pub use ;
pub use ;
pub use AppProfile;
pub use QosProfile;
pub use ;