-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requesttoolchainChanges to build toolchain configurationChanges to build toolchain configuration
Description
Problem
The WRPC (WebAssembly Component RPC) implementation exists in the codebase but appears to be untested and potentially incomplete. While the rules are architecturally complete, there is no evidence of testing or working examples.
Current State
β Implementation Exists
- Rules implemented:
wrpc_bindgen
,wrpc_serve
,wrpc_invoke
in/wrpc/defs.bzl
- Toolchain integration: WRPC binary build support in
toolchains/wasm_toolchain.bzl
- Documentation: Recently added to schema generation and rule reference
β Missing Testing & Validation
- No test files containing "wrpc" anywhere in the project
- No examples using WRPC in
/examples/
directory - No integration tests for the WRPC functionality
- Empty wrpc_commit in MODULE.bazel.lock suggests inactive configuration
π§ Implementation Details
WRPC Rules Structure:
wrpc_bindgen
- Generates language bindings from WIT for RPCwrpc_serve
- Creates executable scripts to serve components as RPC serverswrpc_invoke
- Creates executable scripts to call remote component functions
Toolchain Integration:
- WRPC binary built via cargo from git repository
- Hybrid approach:
git_repository
+genrule
for cargo build - Uses
wrpc-wasmtime
binary from the WRPC project
Recommended Actions
Before considering WRPC as production-ready, we should:
-
Create Basic Example
- Simple client-server WRPC example
- Demonstrate
wrpc_bindgen
generating bindings - Show
wrpc_serve
andwrpc_invoke
working together
-
Test Rule Functionality
- Verify
wrpc_bindgen
can generate valid bindings - Test
wrpc_serve
creates working server scripts - Validate
wrpc_invoke
can call remote functions
- Verify
-
Verify Toolchain Integration
- Ensure WRPC binary builds correctly
- Test toolchain detection and configuration
- Validate hybrid git_repository + cargo approach
-
Add Test Coverage
- Unit tests for rule implementations
- Integration tests for end-to-end WRPC workflows
- CI validation of WRPC functionality
Impact
Currently, WRPC appears to be a proof-of-concept implementation rather than tested, production-ready functionality. This creates a risk of:
- Documentation claiming support for features that don't work
- Users encountering broken WRPC functionality
- Maintenance burden for untested code
Files Involved
/wrpc/defs.bzl
- Rule implementations/wrpc/BUILD.bazel
- Build configuration/toolchains/BUILD.wrpc
- WRPC binary build/toolchains/wasm_toolchain.bzl
- Toolchain integration/tools/generate_schemas/comprehensive_schemas.go
- Documentation generation
Acceptance Criteria
- Working WRPC example in
/examples/wrpc/
- Integration tests for all WRPC rules
- Verified toolchain builds WRPC binary correctly
- CI includes WRPC testing
- Documentation reflects actual tested capabilities
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesttoolchainChanges to build toolchain configurationChanges to build toolchain configuration