Crates.io | golem-wasm-rpc |
lib.rs | golem-wasm-rpc |
version | 1.3.0-rc6 |
created_at | 2024-02-13 17:24:59.286247+00 |
updated_at | 2025-09-24 20:03:53.371904+00 |
description | Golem WASM RPC support library |
homepage | https://golem.cloud |
repository | https://github.com/golemcloud/golem |
max_upload_size | |
id | 1138696 |
size | 799,381 |
Defines data types for Golem's remote function invocation and conversions between them.
WitValue
is the WIT-defined generic data type capable of representing an arbitrary value, generated by wit-bindgen
WitValue
Value
is a recursive Rust type which is more convenient to work with than WitValue
. Conversion between WitValue
and Value
is implemented in both directions.WitValue
itself and conversion from and to Value
and WitValue
Value
to and from wasmtime
valuesThe JSON representation requires additional type information which can be extracted using the golem-wasm-ast crate.
The golem-wasm-rpc
crate can be both used in host and guest environments:
To compile the host version:
cargo build -p golem-wasm-rpc --no-default-features --features host
To compile the guest version, has minimal dependencies and feature set to be used in generated stubs:
cargo component build -p golem-wasm-rpc --no-default-features --features stub
arbitrary
adds an Arbitrary
instance for Value
bincode
adds Bincode codecs for some typeshost-bindings
enables WIT-generated types for wasmtime hostsjson
adds conversion functions for mapping of a WIT value and type definition to/from JSONpoem_openapi
adds poem OpenAPI type class instances for some of the typesprotobuf
adds the protobuf message typesserde
adds serde JSON serialization for some of the typestext
enables wasm-wave
based text representation for valueswasmtime
adds conversion to wasmtime
Val
valueshost
enables all features: arbitrary
, bincode
, host-bindings
, json
, poem_openapi
, protobuf
, serde
, text
, typeinfo
, and wasmtime
stub
is to be used in generated WASM stubs and disables all features, and generates guest bindings instead of host bindings