Guest Support
A Scale Function written in Rust often looks something like this:scale.rs
HTTP Signature
,
which provides an interface for handling HTTP requests and responses. To learn more about the HTTP Signature
and the
interfaces it provides, you can check out the HTTP Signature Reference. Learn more about Signatures in the Signatures Overview.
Compiling these Functions requires the appropriate toolchain to be installed on your machine.
Installing the Rust Toolchain
To use Rust as the Guest Language, you'll need to install the following:- The Rust toolchain
- The Cargo package manager
- The wasm32-unknown-unknown build target
rustup
tool, which will allow you to easily install and manage multiple
versions of Rust on your machine. This can be done by running the following command:
The minimum supported version of Rust for use with Scale Functions is
1.67.0
.The minimum supported version of Cargo for use with Scale Functions is
1.67.0
.wasm32-unknown-unknown
build target. This can be done by running the following
command:
wasm32-unknown-unknown
is listed in the output: