Skip to content

Ostrin v0.1.0

Choose a tag to compare

@github-actions github-actions released this 24 Sep 03:37
· 1253 commits to main since this release

Ostrin 0.1.0 is the first experimental developer release of the Ostrin compiler
(ostrinc). It is meant for trying the language, running the examples and reporting
problems — not for production use. Syntax, diagnostics and the standard library may still
change between 0.x releases.

Supported platforms

Platform Archive
Linux x86_64 (glibc) ostrinc-v0.1.0-x86_64-unknown-linux-gnu.tar.gz
macOS ARM64 (Apple silicon) ostrinc-v0.1.0-aarch64-apple-darwin.tar.gz
Windows x64 ostrinc-v0.1.0-x86_64-pc-windows-msvc.zip

Every archive has a matching .sha256 file and contains ostrinc, LICENSE, README.md
and the repository examples/. Before upload, the release workflow runs the test suite on
each platform, checks that ostrinc --version matches the tag, verifies the checksum,
extracts the archive and runs both examples/hello.ostrin and the packaged project with a
local path dependency. Intel macOS, Linux ARM64 and musl archives are not published yet.

Install

Unix (Linux x86_64 or macOS ARM64):

curl --fail --location https://raw.githubusercontent.com/sircalch/Ostrin/main/scripts/install.sh \
  --output /tmp/ostrinc-install.sh
sh /tmp/ostrinc-install.sh --version 0.1.0

Windows PowerShell:

$installer = Join-Path $env:TEMP 'ostrinc-install.ps1'
Invoke-WebRequest -UseBasicParsing https://raw.githubusercontent.com/sircalch/Ostrin/main/scripts/install.ps1 -OutFile $installer
powershell -ExecutionPolicy Bypass -File $installer -Version 0.1.0 -AddToPath

Both installers download the archive from this release, verify its SHA-256 before extracting
and check ostrinc --version after installing. You can also download an archive by hand,
verify it against its .sha256 file and put ostrinc on your PATH.

Then:

ostrinc --version                     # ostrinc 0.1.0
ostrinc --run examples/hello.ostrin   # ends with "hola desde Ostrin"

What is included

  • Rust compiler and tree-walking interpreter; the interpreter is the semantic reference.
  • Physical quantities as types (5 m / 2 s), with unit conversion and dimension checking.
  • Records, enums, traits, generics, dyn Trait, operator overloading and derive.
  • Option/Result, try/try catch, exhaustive pattern matching with guards.
  • List, Map, Set, Array<T> with broadcasting, statistics and basic linear algebra.
  • Deterministic cooperative concurrency (spawn, join, spawn_scope, channels, select,
    cancellation) and opt-in OS threads for compiled programs (--native-threads).
  • Native compilation through C (--emit-c, --compile) with --leak-check; requires a C
    compiler (gcc, clang or cc, or OSTRIN_CC).
  • Modules and packages with ostrin.toml, local path and explicit Git dependencies,
    deterministic lockfiles and --locked.
  • Small standard library written in Ostrin: math, lists, strings, dates, JSON, args,
    environment and map helpers.
  • Editor tooling: --lsp and --dap servers used by the VS Code extension in
    vscode-ostrin/ (not yet on the Marketplace).
  • Initial scientific example packages: tables, plot (SVG) and forward-mode autodiff.

The browser playground at https://sircalch.github.io/Ostrin/playground.html runs the same
compiler as WebAssembly (WASI); it interprets programs but cannot compile to native code.

Known limitations

  • Experimental. No stability guarantee for syntax, diagnostics or APIs.
  • The native backend is being migrated to typed HIR/IR. Constructs outside the covered
    families use a verified HIR/AST fallback; a few constructs are rejected with a clear error
    instead of compiling with different semantics.
  • Native closures capture by value; native ownership lowering is still conservative for
    complex aggregates and escapes.
  • The interpreter is a simple tree-walker without optimizations.
  • File I/O error messages differ between the interpreter and native programs.
  • No public package registry, networking, GPU execution or reverse-mode autodiff.
  • No Homebrew, winget, Scoop, Chocolatey or AUR packages yet.
  • examples/newlines.ostrin and examples/advanced.ostrin are syntax samples, not runnable
    programs.

Examples

Start with examples/hello.ostrin, physics.ostrin, collections.ostrin,
concurrency.ostrin and dataframe.ostrin, and the project in
examples/pkg_project/main_app (ostrinc --run --project examples/pkg_project/main_app).

Reporting problems

Open an issue at https://github.com/sircalch/Ostrin/issues/new/choose using the bug report
template. Include ostrinc --version, your OS and architecture, the smallest program that
reproduces the problem, the command you ran and its full output. For native compilation
problems, also include your C compiler and its version.

See CHANGELOG.md for the full list of changes.