mirror of
https://github.com/zap-proto/spec.git
synced 2026-10-30 15:04:03 +00:00
The `zt` and `luxcrypto` optional features pulled external path deps that
don't exist in the CI checkout, breaking `cargo build/test --all-features`:
hanzo-zt = { path = "../../hanzo/dev/hanzo-dev/zt" }
luxcrypto-sys = { path = "../../lux/crypto/bindings/rust" }
Both are removed. The crate keeps its complete brand-neutral PQ stack via
the `pq`/`zwing` features (pqcrypto ML-KEM-768 + Dilithium3 / ML-DSA-65,
x25519-dalek, ed25519-dalek, chacha20poly1305) — no crypto weakened.
- Cargo.toml: delete hanzo-zt + luxcrypto-sys deps, the `zt` and
`luxcrypto` features, drop `luxcrypto` from `full`; author -> "The ZAP
Protocol authors"; neutralize brand comments.
- transport.rs: collapse the two `zt` arms (one hardcoded zt-api.hanzo.ai)
into a single `Error::Transport("zt transport not supported")`.
- crypto.rs: remove the luxcrypto-sys FFI backend; de-gate the pqcrypto
impl to `#[cfg(feature = "pq")]`; PQ_BACKEND now reports "pq"; doc
comments reflect the pqcrypto reality.
- zapc.rs / config.rs: neutralize remaining brand strings (author,
copyright, ProjectDirs vendor).
- build.rs: tonic_build `.compile()` -> `.compile_protos()` (deprecation).
Builds green under --all-features, default (zwing), --no-default-features,
and pq-only. 131/131 lib tests pass.
151 lines
4.1 KiB
TOML
151 lines
4.1 KiB
TOML
[workspace]
|
|
|
|
[package]
|
|
name = "zap-schema"
|
|
version = "1.0.0"
|
|
edition = "2021"
|
|
rust-version = "1.75"
|
|
authors = ["The ZAP Protocol authors"]
|
|
description = "ZAP Schema Compiler - Zero-Copy Application Protocol with whitespace-significant syntax"
|
|
license = "MIT OR Apache-2.0"
|
|
repository = "https://github.com/zap-proto/zap"
|
|
homepage = "https://zap-proto.github.io/zap"
|
|
documentation = "https://zap-proto.github.io/zap/docs"
|
|
keywords = ["capnproto", "rpc", "schema", "serialization", "zero-copy"]
|
|
categories = ["development-tools", "encoding", "parser-implementations"]
|
|
readme = "README.md"
|
|
|
|
[lib]
|
|
name = "zap"
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "zap"
|
|
path = "src/bin/zap.rs"
|
|
|
|
[[bin]]
|
|
name = "zapc"
|
|
path = "src/bin/zapc.rs"
|
|
|
|
[[bin]]
|
|
name = "zapd"
|
|
path = "src/bin/zapd.rs"
|
|
|
|
[dependencies]
|
|
# Cap'n Proto
|
|
capnp = "0.20"
|
|
capnp-rpc = "0.20"
|
|
|
|
# Async
|
|
tokio = { version = "1", features = ["full"] }
|
|
futures = "0.3"
|
|
|
|
# CLI
|
|
clap = { version = "4", features = ["derive", "env"] }
|
|
|
|
# Data
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
toml = "0.8"
|
|
|
|
# Logging
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
|
|
# Errors
|
|
thiserror = "2"
|
|
anyhow = "1"
|
|
|
|
# Hashing (for Ringtail consensus)
|
|
blake3 = "1.5"
|
|
|
|
# Encoding (for DID multibase)
|
|
bs58 = "0.5"
|
|
hex = "0.4"
|
|
|
|
# Network
|
|
hyper = { version = "1", features = ["full"] }
|
|
hyper-util = { version = "0.1", features = ["full"] }
|
|
http-body-util = "0.1"
|
|
tokio-tungstenite = { version = "0.24", features = ["native-tls"] }
|
|
tokio-util = { version = "0.7", features = ["codec", "compat"] }
|
|
url = "2"
|
|
reqwest = { version = "0.12", features = ["json", "stream"], optional = true }
|
|
async-trait = { version = "0.1", optional = true }
|
|
|
|
# Config
|
|
directories = "5"
|
|
|
|
# Post-Quantum Cryptography — pqcrypto (Rust crates)
|
|
pqcrypto-mlkem = { version = "0.1", optional = true }
|
|
pqcrypto-dilithium = { version = "0.5", optional = true }
|
|
# FIPS 204 final ML-DSA-65 — used by Z-Wing for cross-language wire-byte
|
|
# compatibility with the Go (cloudflare/circl), Python (dilithium-py),
|
|
# and TS (@noble/post-quantum) implementations.
|
|
pqcrypto-mldsa = { version = "0.1", optional = true }
|
|
pqcrypto-traits = { version = "0.3", optional = true }
|
|
|
|
# Shared crypto deps
|
|
x25519-dalek = { version = "2.0", optional = true, features = ["static_secrets"] }
|
|
hkdf = { version = "0.12", optional = true }
|
|
sha2 = { version = "0.10", optional = true }
|
|
rand = { version = "0.8", optional = true }
|
|
zeroize = { version = "1.7", optional = true }
|
|
|
|
# gRPC/Protobuf (optional, requires 'grpc' feature)
|
|
# NOTE: Only compiled when +grpc feature is enabled
|
|
tonic = { version = "0.12", optional = true }
|
|
prost = { version = "0.13", optional = true }
|
|
prost-types = { version = "0.13", optional = true }
|
|
|
|
# Z-Wing IETF X-Wing combiner (SHA3-256). Always-on, no feature flag —
|
|
# the KEM combiner is a public spec.
|
|
sha3 = "0.10"
|
|
|
|
# Z-Wing full PQ stack (handshake + AEAD channel + identity). Pulled in
|
|
# under the `zwing` feature; default-on so Z-Wing works out of the box.
|
|
ed25519-dalek = { version = "2.1", optional = true, features = ["rand_core"] }
|
|
chacha20poly1305 = { version = "0.10", optional = true }
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|
|
tokio-test = "0.4"
|
|
criterion = { version = "0.5", features = ["html_reports"] }
|
|
hex-literal = "0.4"
|
|
|
|
[build-dependencies]
|
|
capnpc = "0.20"
|
|
tonic-build = { version = "0.12", optional = true }
|
|
prost-build = { version = "0.13", optional = true }
|
|
|
|
[[bench]]
|
|
name = "zap_vs_grpc"
|
|
harness = false
|
|
|
|
[features]
|
|
default = ["zwing"] # Z-Wing PQ secure channel out of the box
|
|
mcp = ["reqwest", "async-trait"]
|
|
pq = ["pqcrypto-mlkem", "pqcrypto-dilithium", "pqcrypto-traits", "x25519-dalek", "hkdf", "sha2", "rand", "zeroize"]
|
|
# Full Z-Wing handshake + channel + identity. Enables the
|
|
# `zap::zwing::full` submodule. Default-on so the PQ secure channel
|
|
# just works.
|
|
zwing = [
|
|
"pqcrypto-mlkem",
|
|
"pqcrypto-mldsa",
|
|
"pqcrypto-traits",
|
|
"x25519-dalek",
|
|
"hkdf",
|
|
"sha2",
|
|
"rand",
|
|
"zeroize",
|
|
"ed25519-dalek",
|
|
"chacha20poly1305",
|
|
]
|
|
grpc = ["tonic", "prost", "prost-types"]
|
|
full = ["mcp", "grpc", "zwing"]
|
|
|
|
[profile.release]
|
|
lto = true
|
|
codegen-units = 1
|
|
strip = true
|