Skip to content
프로젝트

소개

A statically-typed language built for LLMs to write correctly. When the model is wrong, the compiler names the fix. Builds native binaries and WebAssembly from one source.

프로그래밍 언어 및 런타임

이 수치를 측정하는 방법

What you can do

  • Multi-target — one source, a native binary (via Rust) or WebAssembly (direct emit, no LLVM), byte-identical output on every behaviour in the contract ledger (contracts)
  • Diagnostics that name the fix — every error carries its location and its context, and a concrete repair where one is known (codes)
  • Explicit effects — effect fn with expr! propagation; a bare fallible call is an error, never silent (cheatsheet)
  • Types — generics, records, variants with exhaustive match, bidirectional inference, Codec auto-derive (spec)

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
-1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Almide

When the model is wrong, the compiler names the fix.

CI License: MIT / Apache-2.0 Ask DeepWiki

Playground · Cheatsheet · Specification · Quick start · Evidence · How it works · Status

English 日本語 简体中文


Almide is a statically-typed language for code that AI writes and edits. The claim is not that the model gets it right. It is that when the model is wrong, the compiler says so at author time and names the fix. Programs compile to native binaries (via Rust) and to WebAssembly, with byte-identical output on every contracted behaviour. almide verify checks the ownership, bounds, name and capability witnesses of the wasm module almide build ships, pinned to that file by its SHA-256 (what is proven, what is trusted).

Almide at a glance

type Order = { item: String, qty: Int, price: Int }

fn parse(line: String) -> Order? = match line |> string.trim |> string.split(",") {
  [item, qty, price] => match (int.parse(qty), int.parse(price)) {
    (ok(q), ok(p)) => some({ item: item, qty: q, price: p }),
    _ => none,
  },
  _ => none,
}

fn main() -> Unit = {
  let csv = """
    apple,3,120
    pear,oops,90
    plum,5,80
    """
  let orders = csv |> string.lines |> list.filter_map(parse)
  let total = orders |> list.fold(0, (sum, o) => sum + o.qty * o.price)
  println("${list.len(orders)} orders, total ${total}")
}
2 orders, total 760

The row with a bad number falls through to none and is skipped: no exception and no unwrap, and a match that forgets a case doesn't compile. The same program prints the same bytes natively and on wasm, and this file runs in CI as examples/order-total.almd.

An edit that survives

A model adds a case to a type and, as models do, touches nothing else:

type Shape =
  | Circle(Float)
  | Square(Float)
  | Triangle(Float, Float)   // the edit

fn area(s: Shape) -> Float =
  match s {
    Circle(r) => 3.14159 * r * r
    Square(w) => w * w
  }
error[E010]: non-exhaustive match: missing Triangle(_, _)
  --> shape.almd:7:9
  in match
  here: match s {
  hint: add arms for Triangle(_, _):
  Triangle(arg1, arg2) => _
Or use `_ => todo()` to compile incrementally.

The diagnostic is the fix: the model's next turn is Triangle(b, h) => 0.5 * b * h, and the program then prints the same bytes natively and on wasm. The same question asked against Python, on eight injected modification mistakes: demo/make-verify.

Quick Start

Try it in your browser → — no installation.

Install the GitHub CLI (gh) first: the default installer verifies the release attestation and refuses installation without it. See SECURITY.md for verification details.

curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/almide/almide/main/tools/install.sh | sh   # macOS / Linux
irm https://raw.githubusercontent.com/almide/almide/main/tools/install.ps1 | iex        # Windows (PowerShell)

The installer checks the archive against the release's almide-checksums.sha256; every release asset is Sigstore-attested (SECURITY.md shows how to verify one). Each archive also carries almide-verify, the certificate checker almide verify hands its witnesses to. From source, with Rust 1.97+: make install.

fn main() -> Unit = {
  println("Hello, world!")
}
almide run hello.almd                 # native
almide run hello.almd --target wasm   # same bytes, on wasmtime

Features

  • Multi-target — one source, a native binary (via Rust) or WebAssembly (direct emit, no LLVM), byte-identical output on every behaviour in the contract ledger (contracts)
  • Diagnostics that name the fix — every error carries its location and its context, and a concrete repair where one is known (codes)
  • Explicit effects — effect fn with expr! propagation; a bare fallible call is an error, never silent (cheatsheet)
  • Types — generics, records, variants with exhaustive match, bidirectional inference, Codec auto-derive (spec)
  • Memory without annotations — Perceus-style ownership inference, no GC, no lifetimes (memory safety)
  • Fan — structured concurrency on threads natively, in the same output order on wasm (ADR-0024)
  • Standard library — self-hosted .almd modules, each public function inspected on both targets (reference)
  • Tooling built in — almide test, almide fmt, almide check, modules with diamond resolution (how it works)

Learn more

Contributing

Issues and pull requests are welcome. After cloning, run brew install lefthook && lefthook install; commits are in English (the commit-msg hook enforces it). Conventions: CLAUDE.md.

License

Licensed under either of MIT or Apache 2.0 at your option.

관련 프로젝트 살펴보기

불러오는 중…