Skip to content

feat(host-wasm): add @parity/truapi-host-wasm runtime#252

Merged
pgherveou merged 119 commits into
mainfrom
rust-core/05-host-wasm
Jul 10, 2026
Merged

feat(host-wasm): add @parity/truapi-host-wasm runtime#252
pgherveou merged 119 commits into
mainfrom
rust-core/05-host-wasm

Conversation

@pgherveou

@pgherveou pgherveou commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Updates @parity/truapi-host to consume the generated namespaced host callback surface.

The package re-exports the generated callback API, accepts RequiredHostCallbacks, and adapts auth/preimage/chain tests to the generated encoded bridge payloads.

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.
  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. This PR.
  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.

Validation

  • cd js/packages/truapi-host-wasm && npm run build && npm test
  • Also rechecked after merging the updated lower codegen/runtime layers.

@socket-security

socket-security Bot commented Jun 30, 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
Addednpm/​@​parity/​truapi-host@​0.1.0N/AN/AN/AN/AN/A

View full report

Adds the canonical testing module (api/testing.rs) and its v01/v02/versioned
wiring used by the Rust host runtime and generated clients.
@pgherveou pgherveou force-pushed the rust-core/05-host-wasm branch from 4d25aec to ee1a104 Compare July 1, 2026 06:39
@pgherveou pgherveou force-pushed the rust-core/04-codegen branch 2 times, most recently from 2dc7094 to e31bd39 Compare July 1, 2026 06:43
@pgherveou pgherveou force-pushed the rust-core/05-host-wasm branch 2 times, most recently from 36356d0 to f71e58a Compare July 1, 2026 08:14
@pgherveou pgherveou force-pushed the rust-core/04-codegen branch from e31bd39 to 2cc45b1 Compare July 1, 2026 08:14
Base automatically changed from rust-core/04-codegen to rust-core/03-server-runtime July 1, 2026 08:14
@pgherveou pgherveou force-pushed the rust-core/03-server-runtime branch from 71a3f71 to 195a6b7 Compare July 1, 2026 09:26
@pgherveou pgherveou force-pushed the rust-core/05-host-wasm branch from f71e58a to 1aa779b Compare July 1, 2026 09:26
@pgherveou pgherveou force-pushed the rust-core/05-host-wasm branch from 79ffd50 to e895f87 Compare July 1, 2026 20:38
@pgherveou pgherveou force-pushed the rust-core/03-server-runtime branch from 195a6b7 to 538cb2e Compare July 1, 2026 20:38
pgherveou added 19 commits July 8, 2026 14:53
…dge-codegen

# Conflicts:
#	rust/crates/truapi-codegen/tests/golden/host-callbacks-adapter.ts
#	rust/crates/truapi-codegen/tests/golden/host-callbacks.ts
#	rust/crates/truapi-codegen/tests/golden/worker-callbacks.ts
#	rust/crates/truapi-codegen/tests/golden_rust_emit.rs
#	rust/crates/truapi-server/src/lib.rs
Add wasm32 CI and make check coverage, avoid leaking signer callbacks, and reject compound codec callback boundaries during codegen.
Base automatically changed from rust-core/04-wasm-bridge-codegen to main July 10, 2026 07:00
@pgherveou pgherveou requested a review from a team July 10, 2026 07:00
Propagate host subscription stream failures to the WASM runtime, guard worker callback panics, and tighten iframe MessagePort origin handoff semantics. Also refresh the generated callback bridge and sandbox tests so the host runtime behavior is covered.

@TarikGul TarikGul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Verified the fixes I sent you, good to go 🚀 ,

Just have some Ci errors.

@pgherveou pgherveou added this pull request to the merge queue Jul 10, 2026
Merged via the queue into main with commit d098720 Jul 10, 2026
12 checks passed
@pgherveou pgherveou deleted the rust-core/05-host-wasm branch July 10, 2026 13:52
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