Write Python
Run Rust

Sifr compiles Python into safe, native Rust binaries.
No runtime interpreters, no virtual machines, and minimal runtime crashes.

curl -fsSL https://sifr.sh/install | sh
Read Docs
sifr-build-terminal — bash
UTC
Terminal ready. Run build pipeline.
Status: IDLE
Compiling...

The Power of Sifr

Explore Sifr's absolute safety and raw speed.

Zero Overheads Performance

No interpreter tax
Native execution times
No garbage collection pauses
Near-zero memory footprint

The trick: no trick, Sifr uses the great Rust compiler behind the scenes

Lower represents faster execution timeComparative Index
Python (Standard CPython)150.0 ms
Node.js (JS V8 Engine)65.0 ms
Sifr (Native Binary)4.8 ms
Rust (Optimized Cargo Build)3.2 ms

Performance Insights

30x Speedup Over Python
Pure algorithmic operations run up to 30 times faster, mapping direct compiled instructions straight to CPU registers.
No Garbage Collector Latency
Say goodbye to random spikes in server response times. Memory is automatically cleaned up at precise compile-time boundaries.

Elegant Error Handling

Sifr treats errors as values, not surprises. The compiler rejects code that could silently ignore unhandled errors.

Unhandled ResultBlocked by Compiler
main.sifr
def parse_age(s: str) -> Result[int, ParseError]:
return int(s)
def main():
parse_age("25")
# ERROR: unused Result value
Compiler Feedback
error[SIFR-RESULT-0001]: unused Result value of type 'Result[int, ParseError]' must be used
Handle It ExplicitlyCompiles Successfully
main.sifr
def main():
try:
age: int = parse_age("25")
print(f"Age is {age}")
except ParseError as e:
print(e.message)
Compiler Feedback
✓ no errors found

Static Types That Follow Control Flow

Sifr rejects unsafe transactions until your code handles the missing case, automatically narrowing the type subsequently.

Rejected by SifrBlocked by Compiler
main.sifr
def add_one(x: int | None) -> int:
return x + 1
def main():
print(add_one(41))
Compiler Feedback
error: cannot use `int | None` as `int`
help: check whether `x` is `None` before using it as an integer
Compiler Interception: Because the code never handles the potential None case, Sifr blocks compilation, keeping unsafe code away from production.
Accepted by SifrCompiles Successfully
main.sifr
def add_one(x: int | None) -> int:
if x is None:
return 0
return x + 1
def main():
print(add_one(41))
Automatic Narrowing: Since the early return handles the None case, Sifr automatically narrows x to int on the subsequent lines.
AI-Agent & Human Centered

A Compiler Agents Can Read

Sifr is built for the way software is written now: by humans and AI agents working together.
Humans need code they can read. Agents need errors they can parse.
Both need a compiler that stops bad assumptions before they ship.

Readable for humans. Parseable for agents. Strict enough to stop both from shipping unsafe code.

Source CodeContains an active type bug
main.sifr
Pythonic Syntax
def add_one(x: int | None) -> int:
return x + 1
def main():
print(add_one(41))
Code Semantics

The parameter 'x' is marked as potentially None. Adding an integer directly to x triggers Sifr's type safety check, preventing invalid memory state.

Compiler Feedback Output
Diagnostic Terminal
stdout / stderr
$ sifr check main.sifr
error[SIFR-TYPE-0005]: cannot use `int | None` as `int`
--> main.sifr:2:12
|
2 | return x + 1
| ^ `x` may be None
|
= help: check whether `x` is None before using it as an integer
= docs: https://docs.sifr.sh/errors/SIFR-TYPE-0005

For humans, Sifr explains the mistake at the exact line, column, and file range that caused the error.

Architecture Flow

The Sifr Compiler Pipeline

Trace how a single Python statement transits through the compiler layers. Sifr enforces type safety, checking memory and type structures to generate highly optimized native machine executables.

Input FilePlaying Auto-Flow

1. Pythonic Source

Write clean, highly-readable Python syntax with explicit type annotations. Standard functions and loops are parsed with absolute simplicity.

Under The Hood Guardrail

Standard parameters and variables are declared with clean types. Sifr is fully compliant with standard Python IDE type checking.

COMPENSATION FLOW STATUS1 of 4
main.sifr
Source
# main.sifr
def double(value: int) -> int:
return value * 2
result: int = double(21)
print(result)
Compiler State: Source