Skip to content

feat(truapi-codegen): emit Rust dispatcher, wire table, and host callbacks#254

Merged
pgherveou merged 14 commits into
mainfrom
rust-core/04-codegen
Jul 3, 2026
Merged

feat(truapi-codegen): emit Rust dispatcher, wire table, and host callbacks#254
pgherveou merged 14 commits into
mainfrom
rust-core/04-codegen

Conversation

@pgherveou

@pgherveou pgherveou commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Extends the rustdoc-JSON code generator to emit the Rust dispatcher and wire table consumed by truapi-server, plus the TS host-callbacks adapter. Golden tests pin the emitted shapes.

This replaces #251 after reordering the stack so the codegen layer can be reviewed and merged before the server runtime layer.


Stack

Part of the Rust core runtime port umbrella #104. Full port sequence:

  1. feat(truapi): add testing API and versioned wiring #248 - layer 1/9, merged historical: truapi testing API and versioned wiring.
  2. feat(truapi-platform): add host capability traits #249 - layer 2/9, merged historical: truapi-platform host capability traits.
  3. 👉 feat(truapi-codegen): emit Rust dispatcher, wire table, and host callbacks #254 - layer 3/9, merged historical: codegen Rust dispatcher, wire table, and host callbacks. This PR.
  4. feat(truapi-server): add host logic primitives #255 - layer 4/9, merged historical: server host logic primitives.
  5. feat(truapi-server): add wire and chain infrastructure #256 - layer 5/9, merged historical: server wire and chain infrastructure.
  6. feat(truapi-server): add platform runtime and host bridge #250 - active layer 1/4: server runtime, permissions, lifecycle, and permission-flow docs.
  7. feat(codegen): generate wasm bridge callbacks #265 - active layer 2/4: generic wasm bridge/codegen layer.
  8. feat(host-wasm): add @parity/truapi-host-wasm runtime #252 - active layer 3/4: @parity/truapi-host-wasm namespaced callback consumer.
  9. chore: docs, CI, tooling, and dotli integration for the Rust core #253 - active layer 4/4, top: docs, CI/tooling, playground, and dotli integration.

Active child #253 is kept tree-equivalent with umbrella #104.

Adds the canonical testing module (api/testing.rs) and its v01/v02/versioned
wiring used by the Rust host runtime and generated clients.
@socket-security

socket-security Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​tempfile@​3.27.09810093100100

View full report

@pgherveou pgherveou force-pushed the rust-core/04-codegen branch from 2cc45b1 to 8ad3cf9 Compare July 1, 2026 20:38
@pgherveou pgherveou force-pushed the rust-core/02-platform-traits branch from 1a7d349 to 0a7b831 Compare July 1, 2026 20:38
@pgherveou pgherveou force-pushed the rust-core/04-codegen branch from 8ad3cf9 to 8ddbe78 Compare July 1, 2026 21:23
@pgherveou pgherveou force-pushed the rust-core/02-platform-traits branch from 0a7b831 to d2454f8 Compare July 1, 2026 21:23
Comment thread rust/crates/truapi-codegen/src/rust/dispatcher.rs
Comment thread rust/crates/truapi-codegen/src/rust/dispatcher.rs Outdated
Comment thread rust/crates/truapi-codegen/src/platform.rs
Comment thread rust/crates/truapi-codegen/src/platform.rs Outdated
Comment thread rust/crates/truapi-codegen/src/rust/dispatcher.rs Outdated
Comment thread rust/crates/truapi-codegen/src/rust/dispatcher.rs Outdated
pgherveou added 2 commits July 2, 2026 10:10
New crate defining the host syscall traits (storage, navigation, consent,
permissions, ...) that host runtimes implement. Types are re-exported from
truapi::versioned/v01 rather than redefined.
@pgherveou pgherveou force-pushed the rust-core/02-platform-traits branch from d2454f8 to 8c93e99 Compare July 2, 2026 08:14
@pgherveou pgherveou force-pushed the rust-core/04-codegen branch from 8ddbe78 to 3202591 Compare July 2, 2026 08:14

@valentinfernandez1 valentinfernandez1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just small comment

Comment thread rust/crates/truapi-server/src/generated/dispatcher.rs
@pgherveou pgherveou force-pushed the rust-core/04-codegen branch from 3202591 to fb3e219 Compare July 2, 2026 08:59
Comment thread rust/crates/truapi-codegen/src/rust/wire_table.rs
@pgherveou pgherveou force-pushed the rust-core/04-codegen branch from 934973c to 7bd57b8 Compare July 3, 2026 15:32
Base automatically changed from rust-core/02-platform-traits to main July 3, 2026 15:53
@pgherveou pgherveou requested a review from a team July 3, 2026 15:53
@pgherveou pgherveou added this pull request to the merge queue Jul 3, 2026
Merged via the queue into main with commit 256f056 Jul 3, 2026
12 checks passed
@pgherveou pgherveou deleted the rust-core/04-codegen branch July 3, 2026 16:36
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.

3 participants