Sushi Lang¶
Sushi is a compiled, statically typed language with a Lark parser frontend and an LLVM
backend. It pairs explicit error handling (Result<T, E>, Maybe<T>) and compile-time memory
safety (RAII, borrow checking) with zero-cost abstractions — generics, references, and extension
methods that compile away to native code.
fn main() i32:
println("Mostly Harmless")
return Result.Ok(0)
This site collects the guided tutorial, the language and standard-library reference, and the compiler internals in one place.
Start here¶
- Tutorial — a guided, start-to-finish course in 14 chapters; every example is compiled and run.
- Getting Started — install the compiler and build your first program.
- Language Guide — a friendly tour of Sushi's key features.
- Examples — learn by example with annotated programs.
Guides¶
- Error Handling —
Result<T, E>,Maybe<T>, and the??operator - Memory Management — RAII, references, borrowing, and
Own<T> - Generics — generic types, functions, and monomorphization
- Perks — traits/interfaces for polymorphism with static dispatch
- First-Class Functions — function types and function values
- Closures — capturing lambda literals and escaping closures
- Foreign Function Interface — calling external C functions via
unsafe external
Reference¶
- Language Reference — complete syntax and semantics
- Standard Library — built-in types (
Result,Maybe,List,HashMap) - Compiler Reference — CLI options, optimization levels, error codes
- Libraries — creating and linking precompiled libraries
- Library Format — the
.slibbinary format - Nori Package Manager — packaging, installing, and managing libraries
Standard library¶
Result and Maybe; collections (arrays, List, HashMap, strings); I/O
(console, files); and math, time, random, env, process, platform. See the
Standard library section in the navigation.
Internals¶
- Architecture — the compiler pipeline and design
- Semantic Passes — pass-by-pass analysis
- Backend — LLVM code generation
- Stdlib Build — building the standard library
- Variadics (design) — the variadics design note
Philosophy¶
Sushi combines Rust's safety (ownership, borrowing, explicit error handling), Python's simplicity (clean, readable syntax), and C's performance (zero-cost abstractions, native binaries).