Skip to main content
Sifr compiles to Rust, but Sifr source is not Rust with different punctuation. The compiler maps a smaller, Python-shaped surface onto Rust-backed ownership, typed errors, and native code generation. Use Rust as the safety model, not as the syntax model.

Concept Map

Ownership Is Spelled For The Caller

Most Sifr function parameters borrow by default:
Reach for own only when the function’s contract is consumption:
Reach for mut when the function mutates caller-owned state:
There are no lifetime annotations in Sifr source. The compiler still enforces the lifetime and move constraints before emitting Rust.

Option And Result Stay Visible

Sifr uses union syntax for optional values:
Fallible functions use Result[T, E]:
At the call site, try/except is the source-level pattern for consuming a Result:

Inspect The Rust When You Need To

Use sifr emit to inspect generated Rust:
Use this for debugging, auditing, or learning how a construct lowers. Do not rely on generated Rust layout as the public source-level contract.

Async Is Structured

Sifr’s async model does not expose a global event loop as the unit of design. Tasks belong to scopes, and scopes wait for children to finish or cancel.
If you think in Rust terms, prefer “scoped task ownership” over “detached background work.”

Where To Go Next

Ownership and Mutability

See the complete source-level ownership table.

Check and Emit

Use sifr check and sifr emit during development.

Concurrency Overview

Learn scoped tasks, cancellation, and task-boundary ownership.

Build and Run

Compile and run native binaries.