Skip to main content
The stoffel CLI builds .stflb bytecode from StoffelLang source. A built artifact can be run by the CLI, loaded from the Rust SDK, or used as the program artifact for a network deployment.

Build project bytecode

From a Stoffel project directory:
stoffel build reads Stoffel.toml and writes bytecode under target/debug/ by default. Release builds write under target/release/:

Compile a single source file

Use stoffel compile when you want to select a source file and output path directly:
Use --output only when one source file is selected. Project builds should generally use stoffel build.

Optimization and MPC settings

Useful build flags:
--optimize selects O2 unless --release selects O3. --parties and --threshold describe the local MPC topology encoded in the compiled program metadata. Current local and network MPC config validates parties >= 4 * threshold + 1; five parties and threshold one is the common local default. Use --backend honeybadger for field-arithmetic MPC, or --backend avss --field <curve> for AVSS workflows that need group/scalar shares.

Inspect bytecode

Disassemble a built program before debugging runtime behavior:

Use built bytecode from Rust

After stoffel build, application code can load the exact artifact that the CLI produced:
This keeps the application wrapper aligned with the Stoffel program that was checked and built by the CLI.

Deployment handoff

For local development, use stoffel run, stoffel dev, or SDK .execute_local().await?; these surfaces run a local MPC test network on your machine. For deployed systems, the MPC nodes run separately from input/output clients, and application clients connect using the network configuration for that deployment.