mctp-server: add in-process SPDM requester

Parallel to the existing in-process SPDM responder. Same src/main.rs,
selected by Cargo feature flag (in-process-responder vs
in-process-requester) on the Bazel rust_app target, enforced mutually
exclusive via compile_error!.

- New system_image at //target/ast1060-evb/mctp-requester:mctp_requester;
  the existing //target/ast1060-evb/mctp:mctp keeps the responder role.
- Second rust_app target mctp_server_requester in services/mctp/server/
  with distinct codegen_crate_name (app_mctp_server_requester).
- Phase-2 loop body runs an 8-state VCA FSM one step per iteration
  (SendVersion -> AwaitVersion -> ... -> Done / Failed), interleaved
  with the existing Phase-1 I2C drain.
- AWAIT_STEP_BUDGET (10_000) safety net: an Await state that sits on
  TimedOut too long transitions to Failed instead of hanging.
- Counters req_send_ok / req_recv_ok / req_recv_pending logged on the
  Done transition.

Bundled pre-Phase-1 unblockers for the mctp-lib hotfix at 023e75e:
- Server::inbound now discards the new Option<AppCookie> return.
- main.rs consumes the MctpI2cHeader struct from receiver.decode()
  (was a bare u8 source address).

Docs updated: DESIGN_IN_PROCESS_REQUESTER.md, IMPLEMENTATION_PLAN.md
(new), INITIALIZATION.md (requester setup + glossary).

Build verification:
  bazel build --config=k_ast1060_evb //target/ast1060-evb/mctp:mctp
  bazel build --config=k_ast1060_evb //target/ast1060-evb/mctp-requester:mctp_requester
9 files changed
tree: 88c62219c4d61d4ac02feb45173e705add42f872
  1. .cargo/
  2. .claude/
  3. .github/
  4. apps/
  5. docs/
  6. hal/
  7. openprot/
  8. patches/
  9. platform/
  10. services/
  11. target/
  12. third_party/
  13. xtask/
  14. .bazelignore
  15. .bazelrc
  16. .bazelversion
  17. .gitignore
  18. .semgrepignore
  19. BUILD.bazel
  20. BUILD.md
  21. Cargo.lock
  22. Cargo.toml
  23. deny.toml
  24. LICENSE
  25. mctp-parse
  26. MODULE.bazel
  27. MODULE.bazel.lock
  28. out-of-tree.md
  29. port-mctp-echo.md
  30. pw
  31. README.md
  32. rust-toolchain.toml
  33. summary.md
  34. workflows.json
README.md

OpenPRoT

Technical Charter

The OpenPRoT Technical Charter can be found at https://github.com/OpenPRoT/.github/blob/main/GOVERNANCE.md

Getting Started

This project uses cargo-xtask for build automation and project management.

Available Tasks

You can run tasks using cargo xtask <task-name>:

  • cargo xtask build - Build the project
  • cargo xtask test - Run all tests
  • cargo xtask check - Run cargo check
  • cargo xtask clippy - Run clippy lints
  • cargo xtask fmt - Format code with rustfmt
  • cargo xtask clean - Clean build artifacts
  • cargo xtask dist - Build a distribution (release build)
  • cargo xtask docs - Build documentation with mdbook
  • cargo xtask cargo-lock - Manage Cargo.lock file
  • cargo xtask precheckin - Run all pre-checkin validation checks
  • cargo xtask header-check - Check license headers in source files
  • cargo xtask header-fix - Fix missing license headers in source files

Examples

# Build the project
cargo xtask build

# Run tests
cargo xtask test

# Create a distribution
cargo xtask dist

# Format code
cargo xtask fmt

# Run clippy
cargo xtask clippy

# Build documentation
cargo xtask docs

# Run all pre-checkin validation checks
cargo xtask precheckin

# Check license headers
cargo xtask header-check

# Fix missing license headers
cargo xtask header-fix

Development

The project is structured as a Cargo workspace with two main components:

  • openprot/ - The main application
  • xtask/ - Build automation scripts

The xtask workflow allows you to add custom build steps, automation, and project management tasks written in Rust, making them cross-platform and easy to maintain.

Requirements

  • Rust 1.70+ (2021 edition)
  • Cargo

No additional tools are required - everything is handled through Cargo and the xtask scripts.