bytecodealliance/wrpc has 336 GitHub stars and 48 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-21 13:40 UTC. Last push 2026-11-21.
Crecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- Recopilando historial
- in 15 days
- Recopilando historial
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
Acerca de
Wasm component-native RPC framework
Herramientas de desarrolloREADME.md
OriginalwRPC
Component-native transport-agnostic RPC protocol and framework based on WebAssembly Interface Types (WIT)
A Bytecode Alliance hosted project
About
wRPC facilitates execution of arbitrary functionality defined in WIT over network or other means of communication.
Main use cases for wRPC are:
- out-of-tree WebAssembly runtime plugins
- distributed WebAssembly component communication
Even though wRPC is designed for Wasm components first and foremost, it is fully usable outside of WebAssembly context and can serve as a general-purpose RPC framework.
wRPC uses component model value definiton encoding on the wire.
wRPC supports both dynamic (based on e.g. runtime WebAssembly component type introspection) and static use cases.
For static use cases, wRPC provides WIT binding generators for:
- Rust
- Go
wRPC fully supports the unreleased native WIT stream and future data types along with all currently released WIT functionality.
See specification for more info.
Installation
Using
cargo:cargo install wrpcUsing
nix:nix profile install github:bytecodealliance/wrpcor, without installing:
nix shell github:bytecodealliance/wrpcYou can also download individual binaries from the release page
Quickstart
wRPC usage examples for different programming languages can be found at examples.
There are 2 different kinds of examples:
- Native wRPC applications, tied to a particular wRPC transport (like Unix Domain Sockets, TCP, QUIC or WebTransport)
- TCP and Unix Domain Socket transports open one connection per invocation. QUIC, WebTransport and HTTP/2 multiplex many concurrent invocations over a single long-lived connection and are the recommended choice for sustained high call rates (see
SPEC.md).
- TCP and Unix Domain Socket transports open one connection per invocation. QUIC, WebTransport and HTTP/2 multiplex many concurrent invocations over a single long-lived connection and are the recommended choice for sustained high call rates (see
- Wasm reactor components, that need to run in a Wasm runtime. Those can be served, for example, using
wrpc-wasmtime, which serves their exports using wRPC.
Requirements
- For Rust components and wRPC applications:
rust>= 1.93
Nix users can run nix develop anywhere in the repository to get all dependencies correctly set up
hello example
In this example we will serve and invoke a simple hello application.
Rust component
We will use the following Rust component:
Build the Wasm hello server:
cargo build --release -p hello-component-server --target wasm32-wasip2
Output is in target/wasm32-wasip2/release/hello_component_server.wasm
NB: Rust uses
_separators in the filename, because a component is built as a reactor-style library
Using TCP transport
We will use the following two Rust wRPC applications using TCP transport:
[::1]:7761is used as the default address
Serve Wasm
helloserver via TCPwrpc-wasmtime tcp serve ./target/wasm32-wasip2/release/hello_component_server.wasm- Sample output:
INFO wrpc_wasmtime_cli: serving instance function name="hello"
Call the Wasm
helloserver using a native wRPChelloclient via TCP:cargo run -p hello-tcp-client- Sample output in the client:
hello from Rust
- Sample output in the server:
INFO wrpc_wasmtime_cli: serving instance function invocation
INFO wrpc_wasmtime_cli: successfully served instance function invocation
Serve native wRPC
helloserver via TCP:cargo run -p hello-tcp-server [::1]:7762Call native wRPC
helloserver using native wRPChelloclient via TCP:cargo run -p hello-tcp-client [::1]:7762
Repository structure
This repository contains (for all supported languages):
- core libraries and abstractions
- binding generators
- WebAssembly runtime integrations
- wRPC transport implementations
wit-bindgen-wrpc aims to closely match UX of wit-bindgen and therefore includes a subtree merge of the project, which is occasionally merged into this tree.
- wRPC binding generators among other tests, are tested using the
wit-bindgentest suite wit-bindgendocumentation is reused where applicable
Contributing
👋 Welcome, new contributors!
Whether you're a seasoned developer or just getting started, your contributions are valuable to us. Don't hesitate to jump in, explore the project, and make an impact. To start contributing, please check out our Contribution Guidelines.