[package]
name = "makechain-proto"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
description = "Protobuf types and gRPC stubs for the Makechain protocol (buffa + connectrpc)"
readme = "README.md"
categories = ["network-programming", "encoding"]
keywords = ["makechain", "protobuf", "grpc", "connectrpc"]
publish = true
# The .proto source of truth lives at repo-root `proto/`, one level above this
# crate — outside the package tarball. Ship the vendored copy (kept in sync by
# the proto-sync test) so `build.rs` can run in a published/consumer build.
include = ["build.rs", "src/**/*", "proto/makechain.proto", "README.md"]

[dependencies]
# Matches buffa 0.8's own `arbitrary = { version = "1", features = ["derive"] }`.
arbitrary = { version = "1", features = ["derive"], optional = true }
buffa = { workspace = true, features = ["std", "json"] }
buffa-types = { workspace = true, features = ["std", "json"] }
buffa-descriptor = { workspace = true }
connectrpc = { workspace = true }
connectrpc-reflection = { workspace = true }
commonware-codec = { workspace = true }
bytes = { workspace = true }
# buffa's generated code references `serde` directly for canonical proto3
# JSON, so it needs to be a direct dep. (`http_body::Body` bounds in the
# generated server side reach the crate through connectrpc 0.8's
# `connectrpc::http_body` re-export — no direct dep needed.)
serde = { workspace = true }

[features]
# Helpers for building `ServiceRequest`s outside the generated dispatch glue
# (direct service-trait calls in tests and benches).
test-util = []
# `arbitrary::Arbitrary` impls on generated message/enum types, for property
# tests and fuzzing. Off by default; dependents are unaffected. Enabled for
# this crate's own tests via the self-dev-dependency below.
arbitrary = ["dep:arbitrary", "buffa/arbitrary", "buffa-types/arbitrary"]

[build-dependencies]
buffa-codegen = { workspace = true }
connectrpc-build = { workspace = true }

[dev-dependencies]
# Self-dev-dependency: turns the `arbitrary` feature on for this crate's own
# tests without forcing it onto dependents.
makechain-proto = { path = ".", features = ["arbitrary"] }

[lints]
workspace = true
