Maylang 0.14.0 — Elm

Released 2026-10-20 UTC. Maylang targets NodeOS, a capability microkernel, with every runtime, and the compiler runs there: it rebuilds itself on NodeOS into a compiler byte-identical to the one cross-built on Linux. The full runtime's heap can now outgrow 256 MiB, and Float rounding and conversion are stricter.

Behavior changes

  • floor, ceil and round return Floats, and int/trunc fault on values outside the Int range (details under Runtime).

  • The full runtime reserves 1 GiB of address space for its heap (committed on demand). Collection still starts at 256 MiB; a program whose live data exceeds that now keeps running instead of exiting with out of memory.

Remaining limits

  • On NodeOS there are no C externs (no dynamic loader), no sockets (no network service) and no wall clock; children do not inherit the working directory or environment, and created file names must fit 8.3.

  • Compiler hosts are Linux x86-64 and NodeOS; release bundles are Linux x86-64 only.

Targets

  • Add --target x86_64-nodeos for NodeOS, with the full, core and raw runtimes. Images are NXF, written directly with the CRC-32 NodeOS's loader checks. Each syscall site calls a gate into runtime/nodeos.may, an in-process personality that answers the Linux calls Maylang uses with NodeOS syscalls and IPC: console and file I/O, directories, memory, time, exec/system/wait through a spawn extension, and /proc/self arguments. C externs and sockets are unsupported there. See NodeOS target.

  • The compiler runs on NodeOS. A mayc built for NodeOS compiles programs there and defaults to x86_64-nodeos; it rebuilds itself on NodeOS into a compiler byte-identical to the one cross-built on Linux. Without -o, NodeOS output is named <source>.nxf. compiler/mayc/tests/nodeos.py checks the images; NodeOS's make test-maylang runs them.

Compiler

  • Bound the compiler's source arena: a failed mapping or an exhausted arena is reported as an error instead of writing past the mapping (a program importing 300 small modules crashed with a segmentation fault). MAYC_ARENA_BYTES selects the arena size (#39).

  • Reserve only the bytes actually read for each source file instead of 1 MiB per module, so programs with hundreds of imported modules compile in the default arena.

  • Enforce the 4 MiB bound on the expanded import closure. Several modules that were each under the 1 MiB file limit could overflow the expansion buffer; the compiler now stops with the offending line and the chain of imports that reached it (#38).

Runtime

  • Let the full runtime's heap outgrow 256 MiB instead of failing with out of memory: collection still starts at 256 MiB, and when a collection cannot satisfy an allocation the threshold grows within a 1 GiB on-demand reservation. The self-hosted compiler sat at the old limit while compiling itself. exec and system fall back to a spawn extension where fork returns ENOSYS.

  • Fault with a catchable arithmetic error ("Float outside Int range") when int or trunc would produce an Int outside ±2^60 or is given NaN or an infinity. These conversions previously returned 0 or a wrapped value silently. Full, core and LLVM runtimes agree on every target (#89).

  • Behavior change: floor, ceil and round return Floats, as their strict types always declared (floor(2.5) prints 2.0, floor(1.0e300) is 1e300, and NaN, infinities and -0.0 pass through). Use int(floor(x)) where an Int is needed; random_int, stats_quantile and the ML train/test split do so. round no longer rounds 0.49999999999999994 or odd values above 2^52 incorrectly, and format_bytes keeps its decimal (1.5 KiB instead of 1 KiB) (#89).

Behavior contracts

  • Accept for loops over literal Int ranges (a..b, a..=b) in functions with behavior contracts. Range bounds are effect-checked, the loop variable is an immutable body-scoped Int, and break/continue work as in while. Loops over collections, strings or stored ranges remain unknown behavior.

Tools

  • maylsp no longer reports every error twice in editors that pull diagnostics (VS Code): a client that announces pull support now gets diagnostics only from textDocument/diagnostic, and others still get them pushed.

  • scripts/install_nightly.sh builds the checkout and installs it as a nightly generation of ~/.maylang.

  • Pass all four wait4 arguments in the installer and may, which could fail with Cannot wait for compiler verification when the unused rusage register held a stale value.

  • mayfmt --help and mayfmt -h print usage and exit 0 without reading or writing files, and unknown options are rejected before any file is formatted (#64).

  • scripts/doctor.py compiles and links a test program with the selected CC instead of only finding it on PATH, so a broken compiler is reported before the bootstrap fails (#66).

  • may skips directories and non-executable files while searching PATH for native recipe and task commands, and reports explicit paths that are missing, not regular files or not executable separately from PATH exhaustion (#41).

  • may dev no longer hangs when replacing an application that ignores SIGTERM: the process group gets a two-second grace period, then SIGKILL (#42).

  • may targets accept an env list of environment variables whose values join the cache identity, so a native recipe that reads CFLAGS rebuilds when it changes. Values are hashed, never stored in artifact metadata (#40).

Distribution

  • dist/install.sh rejects archives containing symbolic or hard links, special files, duplicate entries or more than one bundle root before extracting, so a supplied archive can no longer make the installer change permissions outside the bundle (#43).