Developer preview v1.1.2 — installation, packaging, and some platform support are still in progress. Read the status
Skip to content

The language ​

Clorraine is C-like on the surface and strict underneath. It keeps the machine model Amiga programmers already know — fixed-width integers, explicit layout, pointers at the hardware boundary, one C translation unit — and changes who owns a value and when it is released.

Design principles ​

PrincipleConsequence
One owner per valueMoves, borrows, and drops are checked; there is no garbage collector
Plain C99 outputThe generated C is inspectable and builds with the toolchains you already use
Amiga-first standard libraryGraphics, audio, Intuition, Exec, DOS, layers, text, ILBM, and RTG ship with the compiler
Profiles, not guessesTarget facts live in a profile; a construct the target cannot lower is rejected
A frozen specificationThe language, grammar, and diagnostics are versioned and tested
Explicit boundariesffi, raw, and volatile mark the places where safety is handed to C or hardware

A small complete program ​

clorraine
module demo.Hello;

import { println } from std.io;

func main(): i32 {
    let who: str = "Amiga";
    println($"Hello, {who}, from Clorraine!");
    return 0;
}

That program is real: it compiles to C99, runs on the host profile, and runs on AmigaOS through the same source.

The tour ​

PageWhat it covers
OwnershipMoves, borrows, drops, parameter modes, and the move-then-use diagnostic
Types and modulesScalars, strings, arrays, slices, structs, enums, handles, and imports
GenericsType parameters, inference, callable bounds, and monomorphization
Lambdas and closuresFunction pointers, capturing closures, capture lists, and C hooks
Volatile and MMIOOverlay types, volatile fields, raw access, and per-chip wrappers
Profileshost, hosted-amiga, hosted-amiga-13, and freestanding
From C to ClorraineThe mental model for an Amiga C programmer, with side-by-side patterns

What the compiler does not do ​

  • It does not hide the C boundary. ffi, raw, and unsafe are explicit.
  • It does not use a tracing collector or an ownership runtime. The generated C contains a small platform shim, not a garbage collector.
  • It does not infer a target from the host machine. You select a profile.
  • It does not promise that every AmigaOS API is covered. The SDK tracks 81 capabilities, each with an acceptance gate.

The frozen specification is the authority for every rule. Start with the specification overview, or follow the tour and open a chapter when you need the exact wording.

Clorraine is an independent project. Amiga, AmigaOS, Kickstart, and Workbench are trademarks of Amiga Corporation. Not affiliated with or endorsed by Amiga Corporation or Hyperion Entertainment.