docs.rs failed to build golem-wasm-rpc-1.0.6
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
golem-wasm-rpc
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 bywit-bindgen
- A builder and an extractor API for
WitValue
Value
is a recursive Rust type which is more convenient to work with thanWitValue
. Conversion betweenWitValue
andValue
is implemented in both directions.- Protobuf message types for describing values and types, and a protobuf version of
WitValue
itself and conversion from and toValue
andWitValue
- JSON representation of WIT values, as defined in the Golem docs.
- Conversion of
Value
to and fromwasmtime
values
The JSON representation requires additional type information which can be extracted using the golem-wasm-ast crate.
Host and stub mode
The golem-wasm-rpc
crate can be both used in host and guest environments:
To compile the host version:
cargo build -p 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 wasm-rpc --no-default-features --features stub
Feature flags
arbitrary
adds anArbitrary
instance forValue
json
adds conversion functions for mapping of a WIT value and type definition to/from JSONprotobuf
adds the protobuf message typeswasmtime
adds conversion towasmtime
Val
valueshost
enables all features:arbitrary
,json
,protobuf
,typeinfo
, andwasmtime
stub
is to be used in generated WASM stubs and disables all features, and generates guest bindings instead of host bindings