Skip to main content
Use the CLI for the edit/check/build/run loop, then use the Rust SDK when your application needs to call a Stoffel program from Rust.

Daily loop

stoffel check validates source and MPC settings without writing bytecode. stoffel build writes .stflb bytecode. stoffel run executes the program through the local MPC test network unless you pass --network with a deployment config.

Watch mode

Run once for scripts or CI:
Run continuously while editing:
stoffel dev watches Stoffel.toml and the configured .stfl sources, rebuilds, and reruns when files change. Tune file polling with --poll-ms.

Inputs

Named function inputs use --input:
ClientStore programs use client-slot inputs:
In StoffelLang, ClientStore.take_share(0, 0) reads input index 0 from client slot 0.

Rust app wrapper

A practical Rust app flow is:
  1. Build the Stoffel program with the CLI.
  2. Load the produced .stflb artifact from Rust.
  3. Pass only the private portion of the request to Stoffel.
  4. Continue ordinary application logic with the returned output.

Debugging commands