refactor(sdk): centralize openrpc_client! macro in hero_livekit_sdk #26

Merged
ashraf merged 2 commits from development_sdk_openrpc_client into main 2026-04-27 12:15:37 +00:00
Member

Summary

  • Added openrpc.rs module to hero_livekit_sdk with the single canonical openrpc_client! invocation
  • Migrated all consumers (UI, examples, rhai) to import from SDK instead of invoking the macro directly
  • Removed hero_rpc_derive direct dependency from consumer crates

Closes #3

Changes

  • New: crates/hero_livekit_sdk/src/openrpc.rs with centralized openrpc_client! macro
  • Modified: crates/hero_livekit_sdk/src/lib.rs to export new module
  • Modified: crates/hero_livekit_ui/ to import from SDK
  • Modified: crates/hero_livekit_examples/ to import from SDK
  • Modified: crates/hero_livekit_rhai/ to import from SDK

Test Results

34 tests passed, 0 failures

## Summary - Added `openrpc.rs` module to `hero_livekit_sdk` with the single canonical `openrpc_client!` invocation - Migrated all consumers (UI, examples, rhai) to import from SDK instead of invoking the macro directly - Removed `hero_rpc_derive` direct dependency from consumer crates ## Related Issue Closes https://forge.ourworld.tf/lhumina_code/hero_livekit/issues/3 ## Changes - New: `crates/hero_livekit_sdk/src/openrpc.rs` with centralized `openrpc_client!` macro - Modified: `crates/hero_livekit_sdk/src/lib.rs` to export new module - Modified: `crates/hero_livekit_ui/` to import from SDK - Modified: `crates/hero_livekit_examples/` to import from SDK - Modified: `crates/hero_livekit_rhai/` to import from SDK ## Test Results 34 tests passed, 0 failures
refactor(sdk): centralize openrpc_client! macro in hero_livekit_sdk
Some checks failed
Build & Test / check (push) Failing after 1m54s
Build & Test / check (pull_request) Failing after 2m23s
fc034762b8
#3
fix(lint): collapse nested if-let chains for clippy::collapsible_if
Some checks failed
Build & Test / check (push) Failing after 0s
Build & Test / check (pull_request) Failing after 1m38s
7750c646cb
#3
ashraf force-pushed development_sdk_openrpc_client from 7750c646cb
Some checks failed
Build & Test / check (push) Failing after 0s
Build & Test / check (pull_request) Failing after 1m38s
to 84bd9741ea
Some checks failed
Build & Test / check (pull_request) Failing after 1m49s
Build & Test / check (push) Failing after 1m55s
2026-04-27 10:11:46 +00:00
Compare
fix(sdk): add build.rs to preserve openrpc module across OSchema regeneration
Some checks failed
Build & Test / check (pull_request) Failing after 0s
Build & Test / check (push) Successful in 1m53s
23820ce6d0
The hero_livekit build.rs (OSchema code generator) regenerates
hero_livekit_sdk/src/lib.rs on every build, stripping any hand-added
module declarations. Add a build.rs to the SDK crate that re-adds
`pub mod openrpc;` to lib.rs before compilation, ensuring the module
is always available regardless of regeneration order.

#3
ashraf force-pushed development_sdk_openrpc_client from 23820ce6d0
Some checks failed
Build & Test / check (pull_request) Failing after 0s
Build & Test / check (push) Successful in 1m53s
to ce752fd1e4
All checks were successful
Build & Test / check (pull_request) Successful in 2m8s
Build & Test / check (push) Successful in 1m52s
2026-04-27 10:59:50 +00:00
Compare
ashraf merged commit ce752fd1e4 into main 2026-04-27 12:15:37 +00:00
ashraf deleted branch development_sdk_openrpc_client 2026-04-27 12:15:37 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_livekit!26
No description provided.