util/ipc: address review feedback, split roles, add AsyncTransaction

Splits IpcChannel into IpcInitiator/IpcHandler so a type only implements
the operations its channel role can serve. Drops the host.rs stub (crate
is now target-only, matching services/i2c/client-ipc and
services/mctp/client-ipc) instead of shipping dead panic methods and a
drifting copy of buffer.rs. Adds AsyncTransaction<H: IpcInitiator>, a
safe layer over the unsafe async trio that tracks the
one-transaction-per-channel invariant locally and cancels on Drop,
converging with the design in #482 instead of shipping both.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
5 files changed
tree: dcb984da1653455103572dcf701b0c93867aa51f
  1. .github/
  2. docs/
  3. drivers/
  4. hal/
  5. openprot/
  6. platform/
  7. presubmit/
  8. services/
  9. target/
  10. third_party/
  11. tools/
  12. util/
  13. .bazelignore
  14. .bazelrc
  15. .bazelversion
  16. .clang-format
  17. .gitignore
  18. .semgrepignore
  19. BUILD.bazel
  20. CONTRIBUTING.md
  21. LICENSE
  22. MODULE.bazel
  23. MODULE.bazel.lock
  24. pw
  25. README.md
  26. rust-toolchain.toml
  27. 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

NOTE: We are converting our build system to bazel. We recommend installing bazelisk to automatically manage bazel versions.

Available Tasks

You can run tasks using the Pigweed workflow launcher pw or bazel.

  • ./pw presubmit - Run presubmit checks: formatting, license checks, C/C++ header checks and clippy.
  • ./pw format - Run the code formatters.
  • bazel test //... - Run all tests.
  • bazel build //docs - Build documentation.

Development

The project is structured as a bazel module.

Requirements

  • Bazel. We recommend installing bazelisk to automatically manage bazel versions.

No additional tools are required - all dependencies are managed by bazel.