Learn

Learn Ostrin.
One step at a time.

The documentation is being built alongside the compiler. Follow the guided path to learn the core ideas, run source-backed examples and use the design documents when you want the full reasoning. For exact rules see the Reference; for workflows, the Guides; for scientific programs, the Cookbook.

guided pathquick startdesign archive

00 / Learn Ostrin

A path from first run to real programs.

Use these chapters in order when Ostrin is new to you. Each step points to a compiler-backed example, a language reference section or a verified project. “Early” means the capability exists but the surrounding tutorial or distribution story is still being developed.

available

02 / Basics

Read bindings, control flow and a main function in the smallest complete example.

Open hello.ostrin ↗
available

03 / Types

Start with explicit state, physical quantities and the type-level checks that make invalid combinations visible.

available

04 / Functions

Move behavior into functions, then add generic parameters and bounds without losing type information.

Open generics.ostrin ↗
available

06 / Records & enums

Give domain data a named shape with records and enums before composing it with pattern matching.

Open match_nested.ostrin ↗
available

07 / Option & Result

Keep absence and failure in the type model with Some, None, Ok and Err.

available

08 / Pattern matching

Make cases explicit and let exhaustiveness checks protect nested domain models.

Open nested patterns ↗
available

10 / Statistics

Work with numeric arrays using mean, variance, standard deviation, percentiles, covariance and correlation.

Open statistics.ostrin ↗
early

11 / Concurrency

Explore channels, spawned tasks and cancellation, then choose deterministic cooperative execution or native threads.

early

12 / Packages

Split a program into importable modules and build a small table-processing project with local package metadata.

Verified project ↗
early

13 / Native compilation

Use the same language surface with the native backend and native thread mode, then compare behavior through tests.

Compiler commands
early

14 / Build something real

Use the showcase as a set of small, inspectable projects: quantities, tables, deterministic SVG and autodiff.

Open the verified showcase ↗
How to use this path: run the linked source, read the matching reference section and make one small change before moving on. The labels describe the current implementation state, not a promise of future behavior.

01 / Quick start

Get a checked program running.

Ostrin currently builds with Rust and Cargo. Clone the repository, run the test suite and execute one of the examples through ostrinc.

PowerShell
# from the repository root
cd compiler
cargo test
cargo run -- --run ..\examples\physics.ostrin
cargo run -- --compile --native-threads ..\examples\concurrency_cancel_blocked_receive.ostrin
cargo run -- --compile --target wasm32-wasi ..\examples\hello.ostrin
Release status: Ostrin 0.2.0 is an experimental developer release for Linux x86_64, macOS ARM64, Windows x64 and WASI Preview 1, published on GitHub with SHA-256 checksums and platform smoke tests. The public package registry and GPU execution remain future work.

02 / Compiler workflow

One binary, several views.

The current command-line surface keeps the implementation inspectable. You can type-check a source file, run it, inspect AST/HIR/IR, emit editor symbols, publish type members, compile native code or emit structured diagnostics.

type-checkostrinc --check file.ostrin
editor diagnosticsostrinc --check --json file.ostrin
inspect HIRostrinc --hir file.ostrin
inspect IRostrinc --ir file.ostrin
inspect effectsostrinc --effect-report file.ostrin
check and runostrinc --run file.ostrin
native threadsostrinc --compile --native-threads file.ostrin
WASI targetostrinc --compile --target wasm32-wasi file.ostrin

Experimental effect inventory

--effect-report uses type information and a conservative call graph to summarize known effects, symbolic callback variables and unresolved calls. Known callback effects propagate through generic wrappers and generic trait-bound methods; unresolved host calls and dynamic dispatch remain visible as open boundaries. This report supports design and debugging; it is not a purity guarantee or a stable public effect contract.

What the checks are protecting

Quantities, mutation rules, generic bounds, trait behavior, pattern matching, modules, ownership cleanup, deterministic concurrency and native parity are all represented in tests and examples.

03 / Reference map

documents, one language.

The design archive is the canonical place to understand why Ostrin looks the way it does. The consolidated reference is the best entry point; the individual documents preserve the sequence of decisions.

17—22

Reference and delivery

Language reference, numeric hierarchy, HIR/IR, standard library and WASM/distribution decisions.

Open the current archive ↗
PROJECT

Context and history

Implementation notes, status and the reasoning behind the current roadmap.

Read project context ↗

04 / Editor support

Ostrin in Visual Studio Code.

The repository includes the first extension surface. It recognizes .ostrin files, provides syntax highlighting, live diagnostics for unsaved text, a persistent stdio language-server session, type-aware member completion, signature help with active arguments, precise compiler-backed expression ranges and types in hover, definition navigation, workspace reference search for unique symbols, scoped rename, conservative document formatting, workspace-scoped semantic caching and an outline, and exposes commands to check or run the current file.

Install locally
cd vscode-ostrinnpx --yes @vscode/vsce packagecode --install-extension .\ostrin-language-support-0.2.0.vsix

After installation, VS Code detects every .ostrin file automatically. A local compiler build in compiler/target/debug is detected without extra configuration.

Next editor layer: semantic tokens, complete workspace resolution and debugging.
Inspect the extension ↗