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 RPC
wrpc_serve - Creates executable scripts to serve components as RPC servers
wrpc_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 and wrpc_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 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
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
wrpc_bindgen,wrpc_serve,wrpc_invokein/wrpc/defs.bzltoolchains/wasm_toolchain.bzl❌ Missing Testing & Validation
/examples/directory🔧 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 functionsToolchain Integration:
git_repository+genrulefor cargo buildwrpc-wasmtimebinary from the WRPC projectRecommended Actions
Before considering WRPC as production-ready, we should:
Create Basic Example
wrpc_bindgengenerating bindingswrpc_serveandwrpc_invokeworking togetherTest Rule Functionality
wrpc_bindgencan generate valid bindingswrpc_servecreates working server scriptswrpc_invokecan call remote functionsVerify Toolchain Integration
Add Test Coverage
Impact
Currently, WRPC appears to be a proof-of-concept implementation rather than tested, production-ready functionality. This creates a risk of:
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 generationAcceptance Criteria
/examples/wrpc/