Repository navigation
Releases
VS Code extension 0.9.28
- Info View: only the name an item starts with is a link (#2271)
Errors, hovers and formatting come from the nanyx compiler the extension runs: see the compiler's changelog.
VS Code extension 0.9.27
- Info View: highlight code as the editor does (#2261)
Errors, hovers and formatting come from the nanyx compiler the extension runs: see the compiler's changelog.
Compiler 0.34.0
22 November 2026
A release that brings the playground up to date with the tour, which now uses is anywhere. It also finishes WASI 0.3
components for both of Nanyx's hosts, lets a program export functions of its own as a component, and gives every
collection the same at.
Language
x is <pattern>is aboolexpression anywhere, not only in anifcondition, and the names a pattern binds are in
scope for the rest of anandchain:x is #some(v) and v > 3.isbinds tighter thanandandor, andnot
tighter thanis, so a negated test is writtennot (x is P)(Pattern matching).
Standard library
atis the indexed read on every collection, and gives#some(a) | #notFound. This breaks code that calls
list.getorseq.get, nowlist.atandseq.at, or that matches#noneor#outOfRangefrom anat
(Lists).setandmapgetany,allandfilterMap, andsetgetsselect(Maps and sets).list.toList,list.fromList,seq.fromListandseq.fromArray(Lists).
Tools
nanyx buildwrites an HTTP-host program as awasi:http/servicecomponent, and a console program that uses
Httpas a component ofnanyx:console/command, which addswasi:http/clienttowasi:cli/command
(Hosts).- A program can export functions of its own from its component:
@component export defputs a def in the WIT
interface its module names, with numbers, strings, records, tuples, lists and tag unions crossing the boundary, and
nanyx buildwrites the WIT toout/wit/(Attributes). - A shipped host library,
nanyx.wasi, holds the WASI code the console and HTTP hosts share; a host's package and
the host libraries it depends on may useHostRuntime(Hosts). - The tour's examples that only declare things no longer show a Run button, only "Open in the playground".
Compiler 0.33.0
22 November 2026
A release about running Nanyx in more places. The docs site gets a playground, and the tour's examples run and can be
edited where they are. nanyx build writes a WASI 0.3 component for a console program, which runs on any host that
runs WASI 0.3, such as wasmtime run. Packages build faster from the cache, and nanyx publish is safer to run again.
Language
- A range works for any type with an
Enumerable(itssucc) and anOrd:a..bis no longer only forints
(Ranges). - An exported scoped context is written
export scoped context. This breaks code that writes
scoped export context: it is nowNYX0050, with a fix that rewrites it, andnanyx formatrewrites it too
(Errors).
Tools
- The playground at
/playground: an editor, Run and Stop, output that keeps each
run, every tour example in its Examples menu, input from a line in the page, and share links. Each runnable example
in the tour has a Run button, can be edited in place, and opens in the playground. nanyx buildwrites a WASI 0.3 component ofwasi:cli/commandfor a program under the console host, with its
Console,Env,Clock,Random,AsyncandFileSystemon the standardwasi:*interfaces;--corewrites a
core module as before.nanyx run,test, the debugger and the profiler are unchanged
(Command line, Hosts).- A package from the cache is checked once and its checked modules kept in the cache, so a later build reads them
instead of checking the package again. nanyx packgives the same bytes on every machine, whatever its line endings; a file that isn't UTF-8 is
NYX0049.nanyx publishchecks access before it makes a release, registers through a branch of the index when it
can push to it, and run again finishes a publish that stopped half way (Command line).- An unknown record field suggests the closest one, with a fix:
'lsat' is not a field of P: did you mean 'last'?
(Errors). - The official linter's new
unusedContextsrule warns on a context a def requires but doesn't use, with a fix, and
the editor draws it faint (Official linter). - The language server marks a name it can't resolve with an
unresolvedsemantic token, drawn in the theme's error
colour.
VS Code extension 0.9.26
- Colour an unresolved name as an error with a semantic token (#2253)
Errors, hovers and formatting come from the nanyx compiler the extension runs: see the compiler's changelog.
Compiler 0.32.0
21 November 2026
A small release about packages. nanyx.json is now a package published to the index rather than one the compiler
ships, a script can use a package from the index by naming its exact version, and nanyx publish can publish a
package's first version.
Standard library
nanyx.jsonis published from nanyx-lang/json at 0.1.x instead of shipping
with the compiler. This breaks code that uses it without declaring it: a package adds
(package = "nanyx.json", version = "0.1")to its dependencies (or runsnanyx install nanyx.json), and a script
writes::dependency nanyx.json 0.1.1(JSON).- This breaks code that calls
reduce: it starts from the first element and gives#nonefor an empty
collection, instead of starting fromDefault(a)'s value, on every collection type.
Tools
- A script names a package from the index at an exact version,
::dependency nanyx.json 0.1.0, and that version is
its pin, so a script needs no lockfile.nanyx runandnanyx pull script.nyxdownload it, and a build reads the
cache alone. A dependency with no version, or a range, isNYX0009, with a quick fix that writes in the newest
version (Files and projects, Packages).
Fixes
nanyx publishno longer fails on a package's first version, andinstall,pulland resolution now explain that
the index doesn't list a package instead of reporting a missing file
(The command line).
Compiler 0.31.0
20 November 2026
A release about packages and errors. A package can now depend on published packages by name and version: nanyx install adds one, the lockfile is written for you, and nanyx publish releases a new version, refusing a version
bump too small for what changed. Every error now has a short headline that names what it's about, with the details
below it. Programs can run in a web page, under a new playground host, and the old parser is gone.
Language
- An error now shows a short headline, its code's title and the one name it's about, such as
Missing context 'Console', with the details on the next line, in the editor and in the terminal. Every error and linter message has
been rewritten to fit (Compiler errors). - This breaks anything that relied on the old parser behind
NANYX_PARSER=fparsec: FParsec and the switch are
gone. After a syntax error, the parser carries on at the next top-level item, so the rest of the file is still
checked.
Standard library
nanyx/clock: aClockcontext withnow(Unix milliseconds) andticks(milliseconds that never go
backwards), provided by the console and HTTP hosts (Clock). This breaks code that declares
its own context namedClock.nanyx.playground, a host that stands in for the console host in a web page, providingConsole,Randomand
Clock, with a runner that runs a program in a web worker (Hosts).
Tools
nanyx install <name>adds a dependency from the package index at its newest usable version, andnanyx pull,
buildandrunwritenanyx.lockwhen the manifest asks for something it doesn't lock. Versions are chosen with
PubGrub, and a conflict (NYX0047) is explained step by step.nanyx build --lockedfails on a stale lockfile, for CI
(Package dependencies,nanyx install).nanyx publishchecks, packs and releases a package on its GitHub repository, refusing a version bump too small
for what changed, and registers its first version with the index.nanyx yankwithdraws a version. A manifest
names its repository withrepository = "owner/name"(Publishing).nanyx api-checkcompares two versions of a package's API, as the index does for each release
(nanyx api-check).NYX0048(Dependency not locked) replaces the old error for a dependency the lockfile doesn't lock, and says to
runnanyx pull.- The formatter keeps a union type written over several lines, one case per line starting with
|, and wraps a long
type definition (Formatter).
Performance
- The checked standard library is read with a typed reader per type, its maps built straight from their sorted items:
nanyx checkof a one-line program allocates about 70 MB, from 138 MB, and is faster to start.
Compiler 0.30.0
20 November 2026
A release about types you can look at and a parser you can build on. Functions take types as arguments, a Type can
be matched on, and records and unions can be built from their descriptions, which is enough to write a generic JSON
encoder and decoder in Nanyx. dbg says where it was called and goes to the host, crashes print a stack with file and
line, and nanyx run --profile writes a profile. The parser is new: a lexer, a layout pass and a recursive-descent
parser replace FParsec. Floats are no longer boxed, and the first compile of a program is faster. Several changes break
existing code; they are marked below.
Language
- Type arguments: a function can take a type, as
type a, and inspect it with amatchon aType; a record or a
union case can be built from its description withbuild(Type arguments,
Inspecting a type, Building a value). Typed(a): the compiler gives an instance for every type (Typed(a)).- An associated type is also a type argument,
type Iter(c).elem, and signatures write associated types by name, as
Iter(c, elem = string)(Associated types). Iterable(c)in the prelude: aforloop walks anythingIterable, and a slice, a set, aseqor anything
Iterablecan be spread into a collection literal (Loops).- A structural type can be protected or private, with a constructor
(Protected types). - A def that writes its type can call itself at other types
(Type inference). export mre-exports a whole module, and a file can re-export one of its ownmodule name =blocks, which can
also be nested (Re-exporting).- An
@externfunction can be passed as a value. - This breaks code that calls a parameter needing a scoped context without supplying it: that is now
NYX0211,
unless the def loads an instance withuse(Contexts). - This breaks code with a match arm for a tag the matched union doesn't have: it is now a type error, with a fix
that removes the arm (Pattern matching). - This breaks code that imports a block's names selectively and relies on getting the rest: only the named ones
come in, and an unknown one isNYX0104. - Parse errors come from the new parser. Where the old one had a focused message, the text and place are the same;
elsewhere, an error names what was expected and what was found, asExpected `]`, found `xs`.
Standard library
nanyx.regex, a linear-time regular expression engine written in Nanyx, with#Matchesand#MatchesRegexfor
regexes in match arms (Regex).- A
Randomcontext, supplied by the hosts and seedable (Random). seqhas every functionlisthas. This breaks code that callsconcatMap: it isflatMap
(Sequences).
Tools
dbgprints the file and line it was called from, and release builds strip it. It goes to the host: the console
host writes it to stderr, the HTTP host to its log with the request. This breaks anything that readdbg
output from stdout (Debug and release builds).- A crash, a deferred error or a runtime error prints the stack, with each frame's file and line.
nanyx run --profile <file>samples the run and writes a profile for the Firefox profiler, with each function's
file and line (nanyx run).- The linter reports a value that a
forloop's body ends with as unused
(Official linter). - Rename a
module name =block. NANYX_PARSER=fparsecswitches back to the old parser, for this release only.
Performance
- A
floatis anf64and anF32anf32, not a box on the heap: float arithmetic allocates nothing. - The checked standard library is read a module at a time, only when it is imported, and carries its exports: the
first compile of a one-line program allocates 146 MB instead of 261 MB, andnanyx checkof it is about 25% faster.
Fixes
- A function that requires a parameterised context, named as a value, finds its instance when only the def's
annotation settles its type, instead of crashing the backend. - A match whose arms join a tag with a named union type checks whichever arm comes first, and no longer leaks memory
when amap.getmatch is followed by a call with a lambda. - A module block nested in a module block parses, and the outer block's later items stay in the outer module.
- A package module with a parse error reports that error.
VS Code extension 0.9.25
- Extension release notes list only its own changes, and the vsix ships a CHANGELOG.md (#1964)
Errors, hovers and formatting come from the nanyx compiler the extension runs: see the compiler's changelog.
Compiler 0.29.0
17 November 2026
Packages arrive: a manifest written in Nanyx, path and GitHub dependencies, a lock file, and shipped packages for
files, JSON and HTTP, including a host that serves a web handler. The standard library gains arrays, slices and
mutable collections, the language gains custom patterns and associated types, and the editor gains a set of
refactorings. Several changes break existing code; they are marked below.
Language
- Custom patterns: declare total and partial patterns, give them arguments, and compose them with
&
(Custom patterns). - Associated types: a context can have a member of kind type, as
FromString(a)does for its failure type; generic
values can be context members, and a type can be generic in contexts (Contexts). - Square-bracket literals build any collection type through
fromArray, and an array can be called:xs(i)is
array.at(xs, i)(Collections). seq { }with a bareyield, and aforloop walks aseq(Sequences and queries).Asyncmarks a function that can wait; the console and HTTP hosts provide it (Async).- Foreign functions are declared with
@extern, and hosts get typed access to linear memory (Hosts). - A type can be declared inside a block, and
+=is a spare operator (MListattaches it to append). - This breaks code that separates contexts with
&: contexts are separated with,, as in[Eq(a), Hash(a)]. - This breaks code that writes a context as a type or holds an instance in a def: a context's instance is written
only in ause. A scoped context must be protected or private. - This breaks code that requires
Add(a)for-:Add(a)haszeroand+, and the newSub(a)has-and
negate. - This breaks code that lists
publicModulesin a manifest: a module is made public withexport module. - Errors are rewritten in one house style across the parser, the type checker and the backend, and a look-alike
character such as U+2212 for-is named, with a fix (Errors). - A program that crashes says why: integer overflow, division by zero, a float that can't be an int, a negative
power, running out of stack (naming the function) or out of memory.
Standard library
Array,Slice,MSliceandStringSlice, and the mutableMRef,MArray,MStackandMList
(Array, Slice, MArray, MList).- Immutable
Stack,Queue,TrieandStringTrie(Stack, Queue,
Trie). seqhas a runtime form;seq.zip,set.toSeq,map.toSeq, andfromSeq,buildandreduceon every
collection type (Sequences).MArray.sortand its family sort in place, stably.list.zipWith,intersperse,chunks,windows,scan,sortDescending,sortByDescendingandsortWith;
allSome;float.format;Default(a)(Lists).- Trigonometry, base-10 and base-2 logarithms,
infinity,nanand its tests, and bitwise functions on ints
(Math). - Shipped packages:
nanyx.fsfor files and directories (file.linesreads lazily),nanyx.jsonwith decoders and
encoders, andnanyx.http.corewith an HTTP client (File system, JSON,
HTTP). - This breaks code that calls
panic: it iscrash, andorCrashjoins it. - This breaks code that calls
countfor a size: maps, sets,MListandMStackhavelength, as every other
collection does. - This breaks code that imports
nanyx/console:ConsoleandEnvcome from the console host's
nanyx.console.core(Console).
Tools
- The package manifest is a
.nyxpfile holding a Nanyx record, not TOML. This breaks every.tomlmanifest,
which the compiler recognises and reports (Packages). - Dependencies on a directory, a file or a GitHub repository pinned to a commit;
nanyx.lock,.nyxpkgpacks and a
package cache, withnanyx pullandnanyx install;nanyx migrateturns scripts into a package
(Packages). - Any package can be a host. The HTTP host serves a
Request -> Responsehandler withnanyx run
(Hosts, HTTP server). - Scripts name their host and dependencies with
::hostand::dependencylines
(Files and projects). nanyx bumpcompares a package's API with its last version and picks the next one;nanyx searchfinds library
functions by name and type;nanyx format --stdin;nanyx run --memory; and the compiler writes.wasmbinary
(The nanyx command).- The linter has
@allow(rule, ...)and the rulesuselessExpressions,unreachableCodeand an unexported nominal
type (Official linter). - In the editor: rename and find references across a package, workspace symbols, semantic tokens, expand selection,
format a range, and refactorings that introduce a local, a function or a type alias, inline one, write an inferred
type, convert between a call and a pipe, a match and an if, a lambda and its shorthand, and++and an
interpolated string, organise imports, and write stubs for a context's missing definitions
(VS Code extension).
Performance
- The standard library and shipped packages are checked when the compiler is built, and a module is checked in
linear time. - The inliner reaches only what the start reaches, takes a function called once whatever its size, and specialises a
function on a lambda it is given (Compiler optimisations). - Functions borrow what they only read, cells taken apart by a pattern are reused, and
MList.setallocates nothing. - Small blocks have free lists, and large ones boundary tags, so freeing never walks the heap.
- A program imports only the WASI functions it uses.
Fixes
- Many type-checker fixes around contexts: point-free functions, lambdas that require contexts, imported aliases,
recursive sequence types, and errors that no longer cascade after an earlier one. - A literal is checked against the type expected of it, through tags, lists and maps.
- Derived
ToStringand==work for a type seen only under an import's alias.