Supported languages
Truebit Verify supports Javascript, Python*, Rust or C/C++
Language Capabilities
Function Tasks are executed in a specially instrumented version of the WASMedge runtime. Functions written in Rust or C++ are directly compiled to WASM. JavaScript and Python are executed by an WASM-compiled interpreter. As is universally true, you may find that compiled functions execute faster than interpreted functions.
Setup
You can write Function Tasks in various development languages. Here's how to install different versions of these languages.
Currently, we support Rust version 1.81 only. Please install it by running the following command-line commands:
curl https://sh.rustup.rs -sSf | sh
source "$HOME/.cargo/env"
rustup install 1.81.0
rustup default 1.81Please run the following line to install WebAssembly and WASI Preview 1 support for Rust:
rustup target add wasm32-wasip1Please run the following command-line commands to download and install the C and C++ compilers and utilities:
Linux
sudo apt install wabt
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-16/wasi-sdk-16.0-linux.tar.gz
tar xvf wasi-sdk-16.0-linux.tar.gz -C ${HOME}
echo "export WASI_SDK_PATH=${HOME}/wasi-sdk-16.0/" >> ~/.profile
source ~/.profileCurrently, we support Node version 22 LTS or above.
We recommend to visit https://nodejs.org/en/download and install the latest v22 LTS version.
Currently, we support Python version 3.12 only.
We recommend to visit https://www.python.org/downloads/ and install version v3.12.
Last updated
Was this helpful?