sifr run and sifr build. Both compile your Sifr source to native code through the same pipeline — the difference is what happens after compilation. sifr run executes the result immediately; sifr build writes a binary to disk that you can distribute or invoke later.
sifr run — compile and execute
sifr run compiles your program and runs the resulting binary in a single step. When the compiler has a cached binary from a previous run on the same source, it skips the build phase and jumps straight to execution.
--:
Flags
Examples
sifr run prints build progress to stderr only when the binary cache misses. A cache hit produces no build output — your program’s stdout follows immediately. --quiet suppresses progress even on a cache miss.sifr build — compile to a native binary
sifr build compiles your program and writes a native binary to the output directory. Use this when you want a standalone artifact you can run later, ship in a container, or benchmark.
-o:
Flags
Build output
A successful build in the defaulthuman diagnostic format writes a phase-aware summary to stderr:
--quiet, the summary is shortened to:
Examples
check, build, and run lock flags require package context and an
authoritative Cargo.lock; Sifr rejects every constrained manifestless command
instead of silently falling back to normal resolution. For Rust interop
packages, the selected mode also governs signature probes and the generated
Cargo build.
Single-file mode vs project mode
Bothsifr run and sifr build select the compilation mode from the nearest
ancestor sifr.toml. The mode determines how local imports are resolved.
Single-file mode is used for every explicit .sifr file outside a
workspace, regardless of its filename, imports, or neighboring files.
Project mode is used for every valid entrypoint inside the nearest valid
ancestor sifr.toml workspace, regardless of its filename or imports. A
malformed discovered manifest is a hard diagnostic.
- Single-file mode
- Project mode
A manifest-less file compiles in isolation. Local sibling imports require a
workspace manifest.
