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 compiled directly to WebAssembly (WASM), while JavaScript and Python are executed by a WASM-compiled interpreter. As is generally true, compiled functions tend to execute faster than interpreted ones.
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.
-l, --lang Options
Rust
Rs (default value)
Javascript
js
Python
py
C
c
C++
c++
Last updated
Was this helpful?