.stfl) compile to portable Stoffel bytecode files (.stflb). The current compiler lives in crates/stoffel-lang; the primary user-facing entry points are the stoffel CLI and Rust SDK.
Pipeline
.stfl source, lowers it to VM function metadata and instructions, then writes the .stflb artifact that the CLI, SDK, and VM can load.
Validate without writing bytecode
check reads project defaults from Stoffel.toml unless you pass a source path. MPC settings can be overridden:
Build a project
build writes bytecode under target/debug or target/release.
Compile a source file
--output to choose the bytecode path.
Optimization flags
--optimize uses O2 unless --release selects O3. --release writes under target/release and uses O3 unless --opt-level is set.
Disassemble bytecode
Run after compiling
Validate repository examples
The repository examples are runnable programs undercrates/stoffel-lang/examples/. From the Stoffel repository root, compile the examples and run local-only examples through the VM with:
examples/dist/. Use the runnable examples guide to choose examples by task.
Common errors
secret placement
Use secret inside type annotations for share values:
secret as a declaration modifier before def or var. The accepted form is var x: secret int64 = ..., not secret var x = ....
Secret control flow
Do not branch on secret values. Reveal/open only the output you intend to disclose, or keep values asShare / secret T and send them to a client output path.