Skip to content
Early preview. Maxon is under active development — incomplete in places, with breaking changes expected before a 1.0 release.

Maxon 0.2.2

Maxon 0.2.2 is released. Archives for every supported target are on the GitHub releases page.

  • MAXON_PREEMPT=off, which stops the scheduler taking a processor back from the green thread holding it, for a program whose result depends on a thread running uninterrupted. Unset or on preempts as before; any other value stops the program before main runs.
  • maxon build, and maxon with no arguments, open with the version line and a warning that Maxon is an early preview whose language, standard library and tools may change incompatibly between releases.
  • A build reports how long the compile took, and no longer prints a line naming the executable format it wrote.
  • The one-line installers make maxon work in the terminal that ran them rather than only in the next one. On macOS and Linux, an install whose PATH already holds a writable ~/.local/bin or ~/bin links the compiler there and edits no shell profile.
  • A StreamingSubprocess handle kept after its child was released could drive the next child the runtime started in the same slot — waiting on it, reading its output, writing to its input. A copied StreamingSubprocess value reached this on its own, because each copy tracked release separately. A released handle is refused now.
  • The sixty-fifth runDetached in a program’s life failed, because a detached child never gave its runtime slot back.
  • Releasing a StreamingSubprocess while another green thread collected it left the collector reading a slot holding no child, and could corrupt the poll records of unrelated sockets and pipes. Two green threads collecting one handle stopped with the error for two readers on one socket. Each of the three is a named stop of its own now.
  • A socket closed and reopened while an operation was parked on it could take the previous socket’s timeout, or wake a green thread that no longer owned it.
  • Connecting to, or binding, an address written as a dotted quad parked the green thread for a name resolution that never ran.
  • On Windows, a socket send or receive cancelled by its deadline after the kernel had already moved part of the buffer reported a timeout and no count, so a retried send went out twice and received bytes were consumed unseen. It reports what it moved, and the deadline is reported by the next call.
  • On Windows, opening, connecting to and closing a socket counted as blocking kernel calls, so the scheduler could take a processor back during them, and Winsock was started up again on every connect.
  • Environment.inheritUpdating and Environment.custom take an EnvMap, which the standard library did not export, so no caller could build the argument. It is public.
  • A compiler rebuilding itself moved the running binary aside before compiling, so a compile error left the tree with no compiler to build the fix — and the move failed outright when another process, such as a language server, still ran the previous binary. The move happens only once the compile has succeeded, and a previous binary still in use is retired aside rather than deleted.
  • On Windows, maxon upgrade ran the install script in a Windows PowerShell that inherited the caller’s PSModulePath. Started from pwsh, that names another edition’s modules ahead of this one’s, and the script stopped with The term 'Get-FileHash' is not recognized. The child is handed this PowerShell’s own module directory.

To install Maxon or upgrade an existing install, see Installation, which also shows how to install a specific release.