mirror of
https://github.com/hanzoai/zap.git
synced 2026-10-30 18:17:49 +00:00
The rename to `zapwire` was inert: `cargo publish` refused the manifest
outright with
all dependencies must have a version requirement specified when
publishing. dependency `zapc` does not specify a version
so nothing could leave the workspace, and crates.io still resolved
`hanzo-zap` to THIS repo via 0.2.1 — the collision the rename exists to
end. The build-dependency now carries both a path and a version: the
path is what the workspace builds against, the version is what a
published `zapwire` resolves from crates.io. `zapc` gains the
`repository` link it was missing, since a crate whose repository field
points at the wrong source is precisely how the `hanzo-zap` confusion
started (0.2.1 declares `repository = hanzoai/zap` from a zap-proto/spec
checkout).
crosswire.rs told the reader to regenerate its golden hex with
`tests/gen_golden.go` — a file that does not exist, leaving hand-editing
hex as the only option the comment explicitly forbids. `interop/golden`
is that generator, and it emits the finished Rust `const` lines rather
than bare hex so there is no transcription step to get wrong. Its output
reproduces the committed fixture byte-for-byte.
`go vet ./interop` -> `go vet ./...`, so the new package is covered by
the same gate rather than needing its own line.
make test: 27 lib + 10 crosswire + 2 live-Go interop, green, exit 0.
Co-authored-by: Hanzo Dev <[email protected]>
48 lines
1.9 KiB
TOML
48 lines
1.9 KiB
TOML
[package]
|
|
name = "zapwire"
|
|
version = "1.0.0"
|
|
edition = "2021"
|
|
description = "ZAP — Zero-copy Application Protocol. Wire-compatible with github.com/zap-proto/go: message codec, RPC envelope with promise pipelining, and a client/server transport."
|
|
license = "MIT"
|
|
repository = "https://github.com/hanzoai/zap"
|
|
keywords = ["zap", "rpc", "binary-protocol", "zero-copy"]
|
|
categories = ["network-programming", "encoding"]
|
|
|
|
# `zapwire` is the ZAP WIRE RUNTIME: header, data segment, call
|
|
# envelope, transport. The name is deliberate — every shorter one in the
|
|
# family already belongs to a different codebase, and one name must mean
|
|
# one thing:
|
|
# zap — an unrelated crates.io project
|
|
# hanzo-zap — hanzo/net/hanzo-zap, published 0.6.75, pinned by
|
|
# hanzo-node and the engine forks
|
|
# zap-proto — a reservation OWNED AND PUBLISHED by zap-proto/spec
|
|
# (see its reserve/zap-proto + release.yml), pointing at
|
|
# zap-schema — the schema compiler, whose lib is also imported as `zap`
|
|
#
|
|
# Schema-generated readers/writers come from our own zapc compiler
|
|
# (path = ../zapc-rs) — no upstream Cap'n Proto dependency.
|
|
|
|
[dependencies]
|
|
tokio = { version = "1", features = ["net", "io-util", "rt-multi-thread", "macros", "sync", "time"] }
|
|
async-trait = "0.1"
|
|
thiserror = "2"
|
|
|
|
[build-dependencies]
|
|
# Both a path AND a version: the path is what the workspace builds
|
|
# against, the version is what a published `zapwire` resolves from
|
|
# crates.io. Without the version `cargo publish` refuses the manifest
|
|
# outright, which is why the rename could not actually ship before.
|
|
zapc = { path = "../zapc-rs", version = "1.0.0" }
|
|
|
|
[dev-dependencies]
|
|
tokio = { version = "1", features = ["full", "test-util"] }
|
|
criterion = { version = "0.5", features = ["html_reports"] }
|
|
|
|
[[bench]]
|
|
name = "wire"
|
|
harness = false
|
|
|
|
[lib]
|
|
name = "zapwire"
|
|
path = "src/lib.rs"
|