zc2 0.0.32

P2P compute broker with credit-based billing, WAL, and broker mesh support
[workspace]
# zc-hooks is publish = false and owns the private zakuro-client git dep, so
# zc2's own manifest stays free of git sources and can go to crates.io.
members = ["crates/zc-hooks"]

[package]
name = "zc2"
version = "0.0.32"
edition = "2021"
rust-version = "1.87"
license = "MIT"
description = "P2P compute broker with credit-based billing, WAL, and broker mesh support"
repository = "https://github.com/zakuro-ai/zc"
readme = "README.md"
keywords = ["compute", "broker", "p2p", "distributed", "billing"]
categories = ["command-line-utilities", "network-programming"]
exclude = ["docs/BENCHMARK_REPORT.md", ".cursorrules", "scripts/__pycache__/"]

[[bin]]
name = "zc"
path = "src/main.rs"

[dependencies]
# Shared wire format — single source of truth for the postcard envelope
# that travels between the zakuro worker (Python) and this broker.
# Defined in https://github.com/zakuro-ai/zakuro/tree/master/crates/zakuro-wire
# (zakuro RFC 0001).
# `version` + `git`: local/CI builds resolve from the pinned git rev, while
# `cargo publish` strips the git spec and depends on zakuro-wire 0.2 from
# crates.io. The rev below IS 0.2.0, so the two agree. 0.1.0 -> 0.2.0 is
# purely additive (EnvelopeV2/ChunkFrame/V2Message), so nothing zc uses moved.
zakuro-wire = { version = "0.2", git = "https://github.com/zakuro-ai/zakuro", rev = "57ee65972647c33941af5aff904278708cb18c77" }
postcard = { version = "1.0", default-features = false, features = ["alloc", "use-std"] }

colored = "2.0.0"
serde = { version = "1.0.159", features = ["derive"] }
serde_json = "1.0"
toml = "0.7.8"
ureq = { version = "=3.3.0", features = ["json"] }
# The `http` crate ureq 3.x's `Agent::run`/`configure_request` take directly —
# used by the deployment-reconciler proxy (`broker::deploy::serve`) to send
# an arbitrary-method request through the broker's shared pooled Agent
# instead of the fixed-verb `agent.get(..)`/`.post(..)` builders. Pinned to
# the version already resolved transitively (via ureq-proto/axum) so this
# doesn't move the lockfile.
http = "1.4"

# Broker dependencies
tiny_http = "0.12"  # interim frontend; removed at end of async phase 1
# Async server migration (ZAK-12, phase 1). tokio is already a direct dep below
# (used by the QUIC transport) with the rt-multi-thread/net/sync/macros features.
axum = "0.7"
tower = "0.5"
dashmap = "6"
# Lock-free MPMC queue for the WAL durability buffer (hot path is lock-free;
# the file mutex is taken only during the batched flush).
crossbeam-queue = "0.3"
uuid = { version = "1", features = ["v4"] }
chrono = { version = "0.4", features = ["serde"] }
# Async outbound HTTP for the /execute worker forward (ZAK-12 phase 2).
# rustls to match the existing rustls 0.23 stack; no default OpenSSL.
# `json` enables the typed .json() body helper used by the async peer-client calls.
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "http2", "json"] }

# System info
hostname = "0.3"
libc = "0.2"
base64 = "0.22.1"
hex = "0.4"
quinn = "0.11"
tokio = { version = "1.52", features = ["rt-multi-thread", "net", "io-util", "time", "sync", "macros", "signal"] }
rcgen = "0.13"
# Already in the tree via rustls; declared directly for SHA-256 (QUIC cert pin).
ring = "0.17"
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"] }
rustls-pki-types = "1"


[features]
default = []

# ifaces is Unix-only (uses nix::sys). Windows users who need WireGuard
# must set the ZAKURO_WIREGUARD_IP env var — get_wireguard_ip falls back
# to that path when the iface-enumeration code isn't compiled in.
[target.'cfg(unix)'.dependencies]
ifaces = "0.1.0"

[profile.dev]
# Line tables keep file:line in panics and backtraces for a fraction of full
# debuginfo's codegen and link cost; dependencies get none.
debug = "line-tables-only"

[profile.dev.package."*"]
debug = false