All releases

Prismio 0.2.0

Async functions and scoped tasks, a language server and formatter in the compiler, freestanding builds with system calls, integers of any width, and a larger standard library.

Published
Status
stable

Prismio 0.2.0 reaches code that waits, code that has no operating system under it, and the editor. async fn, await, scope { } and spawn { } arrive, the compiler serves editors itself through prismio lsp and prismio fmt, and a --freestanding build links nothing from the C library, so a kernel can be written in Prismio.

It is still pre-1.0. Several names changed on the way, so read Breaking changes before upgrading a program written for 0.1.0.

Downloads

Platform Archive Needs
macOS (Apple silicon) prismio-0.2.0-macos-arm64.tar.gz macOS 14 or later for the compiler; programs it builds run on macOS 11 or later
Linux (x86-64) prismio-0.2.0-linux-x64.tar.gz glibc 2.38 or later for the compiler; programs it builds need glibc 2.34 or later
Windows (x86-64) prismio-0.2.0-windows-x64.zip Visual Studio Build Tools and the Windows SDK (see below); no Visual C++ redistributable
Linux (ARM64) prismio-0.2.0-linux-arm64.tar.gz glibc 2.38 or later for the compiler; programs it builds need glibc 2.34 or later
Windows (ARM64) prismio-0.2.0-windows-arm64.zip the same build tools as x86-64

Each archive has a .sha256 beside it. The archives are not signed: the checksum shows the download is intact, not who made it, so take both from this release page. On macOS and Linux the installer does this for you and refuses an archive that does not match:

curl -fsSL https://prismio.org/install.sh | sh

On Windows, unpack the .zip and put its bin directory on PATH. The compiler carries its own LLVM but links programs with the system's linker, so you also need the platform's C tools: the Xcode Command Line Tools on macOS, cc and the C library headers on Linux (build-essential on Debian and Ubuntu), or Visual Studio Build Tools with the Desktop development with C++ workload on Windows. The macOS, Linux x86-64 and Windows x86-64 archives are built and tested by the project's CI. The two ARM64 archives are built and tested on virtual machines, so they have had less use. There is no archive for Intel Macs; build from source (see the installation guide).

Highlights

  • Async functions and scoped tasks. async fn returns a Future<T> and await runs it. scope { } cannot be left until every task started inside it has finished, and spawn { } starts a task whose body is the block.
  • A language server and a formatter, in the compiler. prismio lsp serves LSP 3.17 (diagnostics, hover, definition, references, completion, semantic tokens), and prismio fmt formats source with --check for CI and --stdin for editors.
  • Freestanding programs. --freestanding links no installed runtime, no C library and no startup files. Small kernels written in Prismio boot under QEMU on AArch64 and 32-bit x86 in the project's tests.
  • System calls and platform blocks. std.syscall and linux.syscall.write(...) reach the kernel directly on Linux and macOS, and linux { }, macos { } and windows { } choose code per target.
  • Integers of any width. Int<N> and UInt<N> for any width from 1 to 8,388,608 bits, and five float types.
  • A larger standard library. std.json, HashSet, token and byte input in std.input, and std.poll.
  • T? is the only optional. Option<T> is gone; see the migration notes below.

What is new

Language

  • async fn, Future<T> and await. Calling an async fn does not run it: the call is a Future<T>, a task that has not started, and the body runs where it is awaited. await f(x) is the call itself, with no handle and no allocation. It works on methods, generic functions and recursion, a Vec<Future<Int>> can be collected and awaited in a loop, and async fn main is allowed.
  • scope { } and spawn { }. A scope cannot be left until every task started inside it has finished, on every way out: the closing brace, return, break and continue. spawn { ... } is only allowed inside a scope, captures what it reads by value, and answers with the block's last expression.
  • Int<N> and UInt<N>, an integer of exactly N bits. A width that has a name is that name (Int<8> is I8, Int<32> is Int), so the spellings mix without a cast. Arithmetic wraps at the width, --overflow-checks traps at it, and a literal is range-checked against it.
  • Ptr<T>, a typed pointer, with field reads and writes through it, Ptr<volatile T>, and atomic loads, stores, swaps, arithmetic and compare-exchange with the ordering written at the call (AtomicOrder.AcqRel).
  • Variadic parameters and typelist. fn println<Ts: Printable>(...args: Ts) takes any number of values; functions of one name that each have a pack are overloads.
  • Enum discriminants, representation types and codeset. A codeset gets the smallest integer type that holds its entries.
  • Function markers inline, inline(always), inline(never), noinline, hot and noreturn, and const fn and const.
  • Nested functions, closures with a block body, and visibility on global lets, structs, fields and enums.
  • a ?? b, none-coalescing, and is, is not and not as words for ==, != and !. A condition needs no parentheses: if x == 3 { }.
  • main needs neither -> Int nor return 0.
  • Global arrays and tables. let mut table: Array<U64, 512> is zeroed, writable storage, and a global struct written with a literal is a static table. export, section("...") and align(n) place them.
  • Overloaded extern fns, variadic externs, functionAddress("name") and cString("literal"), so C that takes ... is called correctly on every target.

Standard library

  • std.json. parseJson(text) reads a document strictly per RFC 8259 with the offset of the first error, JsonWriter builds one, and jsonQuote escapes a string.
  • HashSet<K> in std.map, with insert, contains, remove, length, isEmpty and clear.
  • std.input is bytes, tokens and Result parsing over one cursor: readToken(), tokens(), readByte(), readAllBytes(), readIntResult() and readFloatResult().
  • std.poll. waitReadable waits on several descriptors with a timeout, and Child.tryWait() and Stream.readSome(max) let one thread serve a client and supervise a child.
  • std.syscall, generated from the kernels' own headers, with syscallFailed and syscallErrno meaning one thing on every target.
  • sizeOf<T>(), offsetOf<S>("field") and std.errno, for code that shares memory with C.
  • std.mem: buffers and manual memory, stringFromCString, and std.term.isTerminal(fd).
  • std.io is four variadic functions (print, println, eprint, eprintln), and std.display is no longer needed to print a builtin value.

Tooling

  • prismio lsp, a language server with diagnostics computed by the compiler over every open document's unsaved text, plus hover, definition, type definition, references, highlights, outline, workspace symbols, completion across the whole library, and semantic tokens. It also serves build.ums.
  • prismio fmt takes files and folders; --write, --check, --stdin and --range cover the editor and CI forms.
  • check --emit-index writes the semantic index as JSON Lines, and dump-tokens prints the lexical vocabulary.
  • prismio check --partial type checks what parsed, and the frontend no longer ends the run at the first lexical, syntax or import error. A syntax error in one method drops that method, not the block.
  • build.ums gains const and enum, and import build reads the manifest from code, so the compiler's own version lives in one place.
  • -Os and -Oz size levels, and a program may read up to 4,096 source files.
  • LLVM 23.1.5.

Freestanding and bare metal

  • --freestanding links a static image with ld.lld and no runtime, C library or startup files. --native, --native-flag, --link-arg, --target-features, --code-model and --no-red-zone cover the rest, and a build.ums target declares the same.
  • A heap you supply. A freestanding program defines prismio_alloc, prismio_realloc and prismio_free, and then Vec, String, HashMap and std.mem work in a kernel. Modules that need an operating system (std.io, std.fs, std.process, std.time, std.input, std.term and std.math) are not importable.
  • Failure core. runtime/freestanding/panic.c forwards a panic, a checked overflow or a failed assertion to one function the program supplies, prismio_panic_hook.
  • Memory, atomics, assembly and port I/O as builtins, with asmOps in std.asm and a top-level asm "text" for module-level assembly.

Breaking changes

  • Option<T> is gone; T? is the optional. Option.Some(x) is x, Option.None is none, optionOr(o, d) is o ?? d, and o.isSome is o != none. Every function that answered an Option answers a T?.
  • Map is now HashMap. Write HashMap<K, V>() and let m: HashMap<K, V>.
  • An index out of range stops the program, on a Vec and on an Array<T, N>, where a Vec read used to answer the element type's zero. A constant index out of range is a compile error.
  • The stdin value is gone. stdin.lines() is inputLines(), and stdin.isAtEnd is asking for the next item: readLine() answers none at the end of input.
  • std.input loses spellings a better one covers. readLineOr(fallback) is readLine() ?? fallback, and readWords() is readTokens(). readBytes(count) now returns Vec<U8>; the counted read as text is readText(count).
  • Structs are internal and their fields private unless marked.
  • __builtin_* belongs to the standard library. A program that writes one is refused, with the wrapper to write instead.

Fixed

  • Ownership leaks. An owned call result compared with none, readInt() and readFloat() no longer leak the line they read, and a field or element store releases the value it displaces where no view of it can be live.
  • spawn of a function defined below it failed with address of unknown function.

Performance

On the maintained suite of 86 workloads, 71 of them implemented in Prismio, C++ and Rust, Prismio's geometric-mean time is 0.81× of C++ (clang++ -O3) and 0.79× of Rust (-C opt-level=3). That was measured on 2026-11-10 with the 0.2.0 release build on an Apple M5 (arm64, macOS), 5 runs each, with checksum agreement asserted before any timing is read.

Against C++ it is faster on 29 workloads, level on 39 (inside the suite's noise rule) and slower on 2: mergesort and flat_bitset. Against Rust it is faster on 30, level on 34 and slower on 6: flat_bitset, channel_pipeline, graph_churn_transfer, graph_churn_full, base64_codec and indirect_calls. Fifteen more workloads are listed in the suite but not implemented yet and are not counted. These are one machine's numbers; prismio bench re-runs the suite on yours, and the benchmark report has the full table.

Known limits

  • A task is still an operating-system thread. await blocks its thread when the task it awaits is running elsewhere, and a held Future or a task takes at most three arguments.
  • Windows is the least exercised platform. Some Windows-only paths are verified by CI alone.
  • Some temporary shapes still leak. --verify reports them as leaked with no violation.
  • Diagnostic codes are not yet stable.

Exact diagnostic prose, AIF report shape, source syntax, runtime ABI and package layout remain pre-1.0 and may change.

Not included

Networking, regex, mutexes and other synchronization types, a work-stealing executor, user-written lifetimes, exceptions and a ? operator, macros, and a package registry and version solving.

WebAssembly is blocked, not in progress. Prismio emits wasm32 IR, but there is no C library for wasm32-unknown-unknown, so the runtime cannot be built for it.