fix(CLI-02): make Rust crate buildable outside the repository

build.rs resolved the .proto files via a monorepo-relative path and packaging
relied on `cargo publish --no-verify` to hide the resulting failure. Vendor the
three canonical protos into clients/rust/protos/, resolve them via
CARGO_MANIFEST_DIR (in-repo path preferred, vendored fallback for the packaged
crate), ship them via Cargo.toml `include`, and drop `--no-verify` from
pack-clients.ps1.

archreview: CLI-02 (P1). Verified: cargo fmt/check/test (28) + clippy -D warnings,
and `cargo package` (no --no-verify) compiles standalone in the isolated staging
dir — the out-of-repo proof. Vendored-proto drift is guarded by check-codegen.ps1.
This commit is contained in:
Joseph Doherty
2026-07-09 06:17:56 -04:00
parent f726458086
commit 219fa6ddb4
6 changed files with 1513 additions and 5 deletions
+5
View File
@@ -13,6 +13,11 @@ keywords = ["mxaccess", "mxgateway", "grpc", "client", "archestra"]
categories = ["api-bindings", "asynchronous"]
publish = ["dohertj2-gitea"]
build = "build.rs"
# Ship the vendored `.proto` files so `build.rs` can regenerate the tonic/prost
# bindings from the packaged tarball — a consumer building the published crate
# has no access to the in-repo Contracts protos. See CLI-02. Cargo.toml, the
# README, and the license are included automatically.
include = ["src/**/*.rs", "protos/*.proto", "build.rs", "README.md"]
[workspace]
members = ["crates/mxgw-cli"]