Files
zeekayandHanzo Dev a87d24a09f zap: crate is zapwire, not zap-proto — zap-proto belongs to zap-proto/spec
The previous commit took `zap-proto`, which was measured from a LOCAL
checkout of ~/work/zap/spec that is 26 commits behind on a stale
`master` branch. The remote (zap-proto/spec@main) tells a different
story:

  - its crate is now `zap-schema` 1.0.0, lib name `zap`; it no longer
    publishes `hanzo-zap` at all — that half of the collision was
    already fixed upstream;
  - `reserve/zap-proto/` is a DELIBERATE name reservation, published by
    its own release.yml (`working-directory: reserve/zap-proto`,
    `cargo publish`), whose description points at `zap-schema`.

So `zap-proto` is owned and published by another repo, and taking it
would have recreated the exact two-codebases-one-name bug this work
exists to remove. `zap-schema`'s lib is also imported as `zap`, so the
lib name had to move too or the two could never share a dep graph.

  package: zap-proto -> zapwire      lib: zap -> zapwire
  version: 1.0.1     -> 1.0.0        (zapwire is a NEW name: first
                                      publish, not a bump)

`zapwire` is what this crate is: the wire runtime — header, data
segment, call envelope, transport. Verified free on crates.io and
absent from spec's reserve/ set.

Nothing to do in zap-proto/spec: it fixed itself. Judging it from the
stale local checkout would have "retired" 26 commits of live work,
including a Rust `cap` capability runtime.

make test: 27 lib + 10 crosswire + 2 live-Go interop + 1 doctest, green.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-28 22:55:41 -07:00

77 lines
2.1 KiB
Plaintext

@0xc0a8b5e0e5f0a000;
# Canonical ZAP schema. Compiled by zapc (../zapc-rs) at build time
# into `OUT_DIR/zap_schema.rs`, surfaced via `zapwire::proto`.
#
# Layout policy: fields packed in declaration order with primitive
# alignment, struct slot region 8-byte aligned. Text/Data fields use
# an i32 LE relative offset + u32 LE length at the field slot;
# payload bytes follow the slot region. Matches Go luxfi/zap.
# ── Connection lifecycle ───────────────────────────────────────────
struct Init {
clientId @0 :Text;
browser @1 :Text;
version @2 :Text;
}
struct InitAck {
serverId @0 :Text;
name @1 :Text;
manifest @2 :Data;
}
# ── RPC ────────────────────────────────────────────────────────────
struct Push {
id @0 :Text;
method @1 :Text;
params @2 :Data;
}
struct Resolve {
id @0 :Text;
result @1 :Data;
}
struct Reject {
id @0 :Text;
code @1 :Int32;
message @2 :Text;
}
# ── JWKS-via-ZAP push ─────────────────────────────────────────────
# Replaces /.well-known/jwks polling. Subscribers cache locally and
# receive deltas on every Cert mutation in IAM.
struct KeysSubscribe {
application @0 :Text;
cursor @1 :UInt64;
}
struct KeysSnapshot {
application @0 :Text;
seq @1 :UInt64;
jwksJson @2 :Data;
}
struct KeysRotate {
application @0 :Text;
seq @1 :UInt64;
newKey @2 :Data;
}
struct KeysRevoke {
application @0 :Text;
seq @1 :UInt64;
kid @2 :Text;
}
# ── Control ────────────────────────────────────────────────────────
struct Ping { nonce @0 :UInt64; }
struct Pong { nonce @0 :UInt64; }
struct ZapError {
code @0 :Int32;
message @1 :Text;
}