Skip to content

Releases: hyperpolymath/rattlescript

RattleScript v0.1.0-alpha

11 Apr 19:46
24980a0

Choose a tag to compare

Pre-release

RattleScript v0.1.0-alpha

Python-syntax AffineScript. Write code that looks like Python. Get affine resource guarantees and typed WASM out.

What works

  • Python-face syntaxdef, True/False, None, and/or/not, class, pass, import/from, if/elif/else, for, match, # comments, indentation-delimited blocks
  • Type checker — bidirectional inference, Option/Result, algebraic data types, row-polymorphic records
  • Ownership enforcement@linear/@erased/@unrestricted annotations, QTT quantity checking (BUG-001 and BUG-002 closed)
  • WASM codegen — standard WASM and WasmGC targets
  • .rattle extension — auto-detected, no --face flag needed
  • Error messages in Python vocabulary — "Name not found", "Ownership error: single-use variable", "if/else type mismatch"

Alpha caveats

  • Effects runtime: effect/handle are type-checked but not yet executed at runtime. Coming in a near-upstream release.
  • Closures and linear captures: conservative in this release (BUG-004, blocked on borrow checker Phase 3 upstream).
  • Span fidelity: error locations refer to transformed canonical source positions, not original .rattle line numbers.

Getting started

git clone --recurse-submodules https://github.com/hyperpolymath/rattlescript
cd rattlescript
just bootstrap   # builds affinescript + rattle wrapper
rattle eval examples/hello.rattle

Architecture

RattleScript is a thin wrapper around AffineScript. The rattle binary pre-injects --face python into every invocation. All language logic lives in the affinescript submodule — just update-affinescript pulls in upstream improvements automatically.