Skip to content

Maxon 0.2.0

Choose a tag to compare

@github-actions github-actions released this 15 Sep 06:12
· 198 commits to main since this release

What's new

Added

  • One-line installers for macOS, Linux and Windows, which install the latest release into
    ~/.maxon.
  • maxon upgrade, which updates the install the running compiler belongs to.
  • Container images at ghcr.io/maxon-lang/maxon, in debian and distroless variants for amd64
    and arm64.
  • The Homebrew formula serves x64 and arm64 Linux as well as macOS.
  • maxon mcp-server, a Model Context Protocol server exposing build, run, test, format, check, IR
    dumps and error-code lookup to AI tools.

Changed

  • A green thread that runs for 10 ms without waiting is preempted, including inside a loop that
    calls nothing, so one busy thread no longer holds up the others.
  • Socket reads, accepting a connection, subprocess pipes and waiting for a child process park only
    the green thread that waits; none of them occupies an OS thread any more.
  • main runs as a green thread whose stack grows as needed, and idle green threads give back stack
    they no longer use.
  • Mutating a value that a live let can still observe is refused, however the value was reached —
    through a call's result, a closure, an interface method or a union payload as well as a direct
    field. A write through a method or a field that could reach such a record is a new error, E3159.
  • Generated code is substantially faster: every function called from one place is inlined, and the
    optimizer gains value-range analysis, bounds-check elimination against loop limits, loop
    unswitching, jump threading and hot/cold code layout. fannkuch-redux runs in about 1.2× the time
    of the C reference, down from 5.4×.
  • A stack trace names inlined functions as their own frames, and prints up to 100 frames, saying
    when it stops short.
  • The compiler runs its per-function optimization passes and instruction selection in parallel.
  • On Windows, a compiled program's file description is its own name; the "Built with Maxon" credit
    is in its Comments field.

Fixed

  • maxon build intermittently hung on macOS when a build manifest ran subprocesses.
  • Deep recursion in main overflowed its stack at 1 MB on Windows.
  • A function returning a tuple of two records could hand back a freed record.
  • Passing a struct that holds a file or socket to an async call crashed the compiler.
  • A fault on arm64 macOS with a corrupted stack hung instead of printing a trace, and a fault on a
    Windows green thread printed its report twice.
  • maxon run failed in deeply nested directories on Windows.

Install

macOS and Linux

curl -fsSL https://maxon.dev/install.sh | sh

Windows

powershell -c "irm maxon.dev/install.ps1|iex"

Either script downloads the archive for your machine, checks it against SHA256SUMS, installs it
into ~/.maxon and puts maxon on your PATH; maxon upgrade updates the install later. With Homebrew,
brew install maxon-lang/tap/maxon. If you download an archive by hand on macOS, run
xattr -d com.apple.quarantine ./maxon once.

⚠ Keep maxon, stdlib/ and runtime/ together. The compiler finds its standard library
and its runtime by walking up from its own executable, so moving the binary out on its own leaves
it unable to compile.

Verify a download

SHA256SUMS is published beside the archives. The archives themselves are not signed, so
the checksum is what tells you a file is the one that was built.

Assets

  • maxon-0.2.0-arm64-linux.tar.gz
  • maxon-0.2.0-arm64-macos.tar.gz
  • maxon-0.2.0-x64-linux.tar.gz
  • maxon-0.2.0-x64-windows.zip