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.

Language
Task Instrumentation
Task preparation
Dependencies

Rust v1.81 only

WASM32-WASI target

Custom

Wasienv

WASI-SDK 16

No

Python 3.12 only

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.81

Please run the following line to install WebAssembly and WASI Preview 1 support for Rust:

rustup target add wasm32-wasip1

-l, --lang Options

Language
Value

Rust

Rs (default value)

Javascript

js

Python

py

C

c

C++

c++

Last updated

Was this helpful?