Skip to content

refactor(barretenberg-rs): migrate to ipc-codegen + ipc-runtime; drop PipeBackend - #23613

Closed
charlielye wants to merge 5 commits into
cl/ipc-bb-migratefrom
cl/ipc-bb-rs-migrate
Closed

charlielye wants to merge 5 commits into
cl/ipc-bb-migratefrom
cl/ipc-bb-rs-migrate

Conversation

@charlielye

@charlielye charlielye commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Migrates barretenberg-rs to the generated bb API client from #23612 and the shared /ipc-runtime Rust bindings from #23610.

This PR sits between the bb server migration and the bb.js migration.

Stack

  1. feat(ipc): add /ipc-codegen and /ipc-runtime foundation packages #23610 cl/ipc-foundation
  2. refactor(wsdb): migrate aztec-wsdb to ipc-codegen + ipc-runtime #23611 cl/ipc-wsdb-migrate
  3. refactor(bbapi): migrate bb binary to ipc-codegen + ipc-runtime #23612 cl/ipc-bb-migrate
  4. refactor(barretenberg-rs): migrate to ipc-codegen + ipc-runtime; drop PipeBackend #23613 cl/ipc-bb-rs-migrate — this PR
  5. refactor(bb.js): migrate to ipc-codegen + ipc-runtime; delete legacy bb::ipc #23614 cl/ipc-bb-js-migrate
  6. refactor: cut-over to new wsdb package - comms over uds ipc. #23036 cl/ipc-3-avm-wsdb-cutover
  7. feat: add generated aztec-vm-sim package setup #23084 cl/ipc-4-avm-binary
  8. feat: cut simulator over to generated bb-avm-sim IPC service #23697 cl/ipc-5-avm-cutover

What changes

  • Generates Rust bb types and client code from bb_schema.json.
  • Uses the generated BbApi over ipc_runtime::IpcClient.
  • Removes the old hand-written Rust backend/types/error layers.
  • Removes the legacy PipeBackend; Rust clients now use the IPC runtime path.
  • Keeps the FFI entrypoint conventional and non-configurable.
  • Updates tests for fixed-size bin32/alias handling from the schema.

Validation

  • barretenberg-rs release build with local BB_LIB_DIR.
  • Rust tests adjusted for generated fixed-size values and conventional FFI entrypoint.

@charlielye
charlielye force-pushed the cl/ipc-bb-migrate branch from a4bbaea to 14f9b51 Compare May 28, 2026 06:19
@charlielye
charlielye force-pushed the cl/ipc-bb-rs-migrate branch from e77abcf to 7e96565 Compare May 28, 2026 06:19
@charlielye
charlielye force-pushed the cl/ipc-bb-migrate branch from 14f9b51 to c1eac55 Compare May 28, 2026 07:10
@charlielye
charlielye force-pushed the cl/ipc-bb-rs-migrate branch from 7e96565 to 1613aa0 Compare May 28, 2026 07:10
@charlielye
charlielye force-pushed the cl/ipc-bb-migrate branch from c1eac55 to 3ae8af4 Compare May 28, 2026 09:26
@charlielye
charlielye force-pushed the cl/ipc-bb-rs-migrate branch from 1613aa0 to c0dc6a8 Compare May 28, 2026 09:26
@charlielye
charlielye force-pushed the cl/ipc-bb-migrate branch from 3ae8af4 to 34d56b4 Compare May 28, 2026 09:40
@charlielye
charlielye force-pushed the cl/ipc-bb-rs-migrate branch from c0dc6a8 to fc07715 Compare May 28, 2026 09:40
@charlielye
charlielye force-pushed the cl/ipc-bb-migrate branch from 34d56b4 to 66ffb2b Compare May 28, 2026 10:43
@charlielye
charlielye force-pushed the cl/ipc-bb-rs-migrate branch from fc07715 to be7439e Compare May 28, 2026 10:43
@charlielye
charlielye force-pushed the cl/ipc-bb-migrate branch from 66ffb2b to 2793608 Compare May 28, 2026 11:07
@charlielye
charlielye force-pushed the cl/ipc-bb-rs-migrate branch 2 times, most recently from be7439e to e456007 Compare May 28, 2026 11:07
@charlielye
charlielye force-pushed the cl/ipc-bb-migrate branch from 2793608 to e4043d1 Compare May 28, 2026 11:24
@charlielye
charlielye force-pushed the cl/ipc-bb-rs-migrate branch from e456007 to 9f87d9a Compare May 28, 2026 11:25
@charlielye
charlielye force-pushed the cl/ipc-bb-migrate branch from e4043d1 to ecae1fa Compare May 28, 2026 11:39
@charlielye
charlielye force-pushed the cl/ipc-bb-rs-migrate branch from 9f87d9a to bfa811c Compare May 28, 2026 11:39
@charlielye
charlielye force-pushed the cl/ipc-bb-migrate branch from ecae1fa to 396a0f4 Compare May 28, 2026 12:23
Addresses the full ipc-codegen/ipc-runtime review (68 findings):
- runtime: NAPI lifecycle (close/join, TSFN leak, sync deadline), zero-length
  response deadlock, u64 timeout truncation, max-frame guards, crash cleanup,
  unified constants, UDS timeouts, new cpp/rust/ts test suites
- codegen: schema validation (required error variant, name pairing, reserved
  words), unified server error wrapping, zig comptime handler injection,
  uniform --strip-method-prefix, skeleton/dead-code removal
- wire fixes: rust Option<bytes>/[bytes;N] serde, ts u64 bigint bridging +
  bin32 guards, zig signed-int tolerance, cpp union ordering + PrimAlias so
  schema reflection of generated types round-trips aliases
- tests: golden corpus extended (error variant pinned) with cpp/zig runners,
  error-path + boundary-value steps in every matrix combo, FFI compile checks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant