Crates.io | golem-wasm-rpc |
lib.rs | golem-wasm-rpc |
version | |
source | src |
created_at | 2024-02-13 17:24:59.286247 |
updated_at | 2024-12-09 11:16:58.744104 |
description | Golem WASM RPC support library |
homepage | https://golem.cloud |
repository | https://github.com/golemcloud/wasm-rpc |
max_upload_size | |
id | 1138696 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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 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
arbitrary
adds an Arbitrary
instance for Value
json
adds conversion functions for mapping of a WIT value and type definition to/from JSONprotobuf
adds the protobuf message typeswasmtime
adds conversion to wasmtime
Val
valueshost
enables all features: arbitrary
, json
, protobuf
, typeinfo
, and wasmtime
stub
is to be used in generated WASM stubs and disables all features, and generates guest bindings instead of host bindings