Truebit Verify
  • Getting Started
    • 📄What is Truebit Verify?
      • How does Truebit work?
      • System Actors
    • ⏱️Get Started
    • ⚙️Architecture
      • Truebit Verify Hub
      • Truebit Verify Nodes
      • What is a transcript?
        • Transcript example
        • API Transcript example
    • Key Concepts
      • What is verification?
      • Determinism
      • WebAssembly
      • Task instrumentation
  • Developing Truebit Tasks
    • Introduction
    • Writing Function Tasks
      • Supported languages
        • Javascript
        • Python
        • Rust
    • Writing API Tasks
    • Task examples
      • Function Task examples
        • Fibonacci
        • Reverse Alphabet
        • Encrypt sha256 using bun.js
        • Encrypt sha256 using Deno
        • ECDSA signature verification
        • NumPy example
      • API Task examples
        • Pet Store CRUD
        • API-Auth examples
    • Namespace management
    • Task Authorization
    • Truebit CLI
      • secret.json
  • Executing Truebit tasks
    • Introduction
    • Task Execution API
      • Execute Function Tasks
      • Execute API Tasks
      • Get Task Status
    • Transcript API
      • Get Transcript
      • Get Invoice
  • Community
    • Truebit Unchained Protocol
    • Support
Powered by GitBook
On this page
  • What is WebAssembly?
  • Limitations
  • Why do we use it?

Was this helpful?

  1. Getting Started
  2. Key Concepts

WebAssembly

Truebit uses WebAssembly as a foundational technology to ensure security, compatibility, and high-performance execution for its decentralized verification protocol.

PreviousDeterminismNextTask instrumentation

Last updated 2 months ago

Was this helpful?

What is WebAssembly?

(WASM) is a compilation target that allows to run high-performance code written in compiled languages like C, C++, and Rust to run in a platform-independent way through a sandboxed interpreter.

The (WASI) is the systems interface for WebAssembly. It allows to call specific operating system-related services to be called from inside the execution sandbox. WebAssembly programs can access filesystem data, environment variables, and program arguments through this interface. Truebit is compatible with WASM programs that use the WASI version known as 'Snapshot 1'.

Limitations

  • All ingress/egress networking is disabled – you won't be able to pull data/code/weights/etc from an external source. WASM jobs can access the data by reading from the filesystem.

  • There is no multi-threading as WASI Snapshot 1 does not expose any interface for it.

Why do we use it?

Truebit uses WebAssembly as a foundational technology to ensure security, compatibility, and high-performance execution for its verification protocol.

  1. Portability: Web assembly code can run unmodified on various platforms, ensuring compatibility across different systems.

  2. Security: It provides a secure execution environment, critical for Truebit's , which involves executing untrusted code.

  3. Performance: WebAssembly's speed is essential for the efficient execution of Truebit's complex verification tasks.

  4. Language Flexibility: Developers contributing to Truebit can write code in , thanks to WebAssembly's language-agnostic nature.

WebAssembly
WebAssembly System Interface
verification process
multiple languages