Programming language
Tyu
Safety is not the brake — it’s the engine. The rigor is what licenses the daring parts.
— Assembling in Tyu, Chapter 1 — The Rigor Is the Engine
Tyu targets the bare metal: freestanding images, MMIO, interrupt handlers on a budget, tasks and channels the platform provides. The toolchain checks the claims as you write — types make illegal values unrepresentable, contracts are promises the machine reads, effects are declared and discharged, and the developer-proof pipeline turns a program’s obligations into goals a proof assistant closes. When the checks pass, the daring parts are simply safe.
# Install
The toolchain is optional — the browser REPL needs nothing but a tab. To work natively, build from source — Rust via rustup, no other prerequisites:
Clone and build the Tyu toolchain
git clone https://github.com/lexbity/tyu.git
cd tyu_lang
cargo build --release -p langc -p tyu -p lmod-pack -p lmod-sign -p lmod-encrypt
export PATH="$PWD/target/release:$PATH"
The full tiered setup — hosted-first toolchain, QEMU for the metal interludes, and the smoke fixture that proves your first build — is Appendix C and the repository’s SETUP.md .
# Try it
-
Run a lab in your browser — no install
Open the browser REPL : a CodeMirror editor with a Tyu grammar, the book’s labs preloaded as one-click examples, an interpreter and a wasm32 backend, and a debug console. Start with Lab 1.1 — hello, checked. -
Write your first module
A Tyu program is a stack of promises. Start with the ten-minute first chapter: your first.modfile,langc --emit=tc, and the first red/green lab. -
Run the labs natively
Every chapter ships green labs (should compile and run), red labs (must be rejected, with the exact error), and engine labs (the checker itself). The fixtures live in the repository underdocs/book/labs/and are mirrored under/book/labs/on this site. -
Prove something
Chapter 14 walks the developer-proof pipeline: obligations harvested from your contracts, discharged with the pinned Lean toolchain.
# Read the book
Assembling in Tyu — draft v3 — is the documentation. Every lab real, every transcript verbatim, written in the open: