Skip to main content

Build a Stoffel application

Stoffel is a programming and runtime stack for the private computation inside an application. You write the private workflow in StoffelLang, compile it to .stflb bytecode, run it through local MPC during development, and call it from Rust application code with the SDK. Use these docs to:
  • install the stoffel CLI;
  • create a project;
  • check and build .stflb bytecode;
  • run local MPC on your machine;
  • call a Stoffel program from Rust;
  • understand how shares, parties, thresholds, and openings fit into the application boundary.

The private-computation boundary

Most application stacks encrypt data at rest and in transit, then decrypt it so the app can run its logic. That makes sensitive user context part of ordinary application state: available to services, logs, analytics, support tools, operators, and downstream integrations unless every layer is carefully constrained. Stoffel gives you a different boundary for the sensitive part of the workflow. Private values enter the computation as shares. The program computes over those shares. Only explicit openings or client outputs leave the boundary. Side-by-side Stoffel-branded data-flow comparison: the usual app stack decrypts user data into plaintext app state that fans out to logs, databases, analytics, and support systems; the Stoffel stack splits user data into shares, sends only shares across the private-computation boundary, runs MPC parties that hold shares only, and returns authorized output through an explicit opening or client output. Read the diagram as a data-form comparison. In the usual app stack, decrypting to compute turns sensitive context into plaintext app state that can spread through ordinary infrastructure. In the Stoffel stack, plaintext stays at the app/client edge; shares cross the private-computation boundary; MPC parties exchange protocol messages while holding shares only; and only an explicit authorized output leaves.

How the stack fits together

Docs-optimized Stoffel stack diagram showing app integration, language and CLI, bytecode and VM, and MPC runtime layers.
LayerDeveloper-facing surfaceWhat it does
App integrationRust SDK / generated bindingsConnects product code to Stoffel programs, inputs, outputs, local checks, and local MPC runs.
Language + CLI.stfl source / stoffel commandChecks source, builds bytecode, runs project workflows, and drives local development loops.
Bytecode + VM.stflb / register VMLoads the compiled artifact, separates clear values from shares, and executes builtins and runtime hooks.
MPC runtimecoordinator / parties / outputsRuns secret-shared execution and opens or sends only the outputs the program authorizes.

Choose a path

If you want to…Start here
Install StoffelInstallation
Create and run a projectQuick start
Learn the daily CLI loopBasic usage
Build a first private computationYour first MPC project
Call Stoffel from an appRust SDK overview
Understand the runtime layersSystem architecture