Files
mxaccessgw/clients/rust/README.md
T
2026-04-26 19:47:26 -04:00

1.4 KiB

Rust Client Workspace

The Rust client workspace contains the MXAccess Gateway client library, a test CLI, and scaffold tests for generated contract wiring. The library uses the shared protobuf inputs documented in ../../docs/client-proto-generation.md so the Rust bindings compile against the same public gateway and worker contracts as the server.

Layout

clients/rust/
  Cargo.toml
  build.rs
  src/
  tests/
  crates/mxgw-cli/

build.rs reads the .proto files from ../../src/MxGateway.Contracts/Protos and generates tonic/prost bindings into Cargo build output. src/generated.rs declares the Rust modules that include those generated files. src/generated remains reserved for checked-in generator output if the crate later changes to source-tree generation.

Build And Test

Run the Rust workspace checks from clients/rust:

cargo fmt --all --check
cargo test --workspace
cargo check --workspace

The build script uses protoc from PATH or the Windows path recorded in ../../docs/toolchain-links.md.

CLI

The scaffold CLI exposes version information:

cargo run -p mxgw-cli -- version --json

Additional commands are implemented with the client/session wrapper work.