01 / Run Ostrin
Install the Rust toolchain, run the test suite and execute a first program locally or in the browser.
Learn
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.
00 / Learn Ostrin
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.
Install the Rust toolchain, run the test suite and execute a first program locally or in the browser.
Read bindings, control flow and a main function in the smallest complete example.
Open hello.ostrin ↗Start with explicit state, physical quantities and the type-level checks that make invalid combinations visible.
Move behavior into functions, then add generic parameters and bounds without losing type information.
Open generics.ostrin ↗Use lists, maps and sets, then transform data with map, filter, fold and find.
Open collections.ostrin ↗Give domain data a named shape with records and enums before composing it with pattern matching.
Open match_nested.ostrin ↗Keep absence and failure in the type model with Some, None, Ok and Err.
Make cases explicit and let exhaustiveness checks protect nested domain models.
Open nested patterns ↗Carry dimensions through arithmetic so a length, time and derived velocity cannot be silently confused.
Work with numeric arrays using mean, variance, standard deviation, percentiles, covariance and correlation.
Open statistics.ostrin ↗Explore channels, spawned tasks and cancellation, then choose deterministic cooperative execution or native threads.
Split a program into importable modules and build a small table-processing project with local package metadata.
Verified project ↗Use the same language surface with the native backend and native thread mode, then compare behavior through tests.
Compiler commandsUse the showcase as a set of small, inspectable projects: quantities, tables, deterministic SVG and autodiff.
Open the verified showcase ↗01 / Quick start
Ostrin currently builds with Rust and Cargo. Clone the repository, run the test suite and execute one of the examples through ostrinc.
# 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.ostrin02 / Compiler workflow
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.
ostrinc --check file.ostrinostrinc --check --json file.ostrinostrinc --hir file.ostrinostrinc --ir file.ostrinostrinc --effect-report file.ostrinostrinc --run file.ostrinostrinc --compile --native-threads file.ostrinostrinc --compile --target wasm32-wasi file.ostrin--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.
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
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.
Variables, functions, traits, errors, enums, ranges, modules, logic and concurrency.
Read the design archive ↗Memory model, derive, collections, packages, dynamic traits and generic conversions.
Browse the specifications ↗Language reference, numeric hierarchy, HIR/IR, standard library and WASM/distribution decisions.
Open the current archive ↗Implementation notes, status and the reasoning behind the current roadmap.
Read project context ↗04 / Editor support
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.
cd vscode-ostrinnpx --yes @vscode/vsce packagecode --install-extension .\ostrin-language-support-0.2.0.vsixAfter installation, VS Code detects every .ostrin file automatically. A local compiler build in compiler/target/debug is detected without extra configuration.