Skip to content

Releases: Londopy/nexium

Nexium v1.0.2 — Annapurna: Terray

Choose a tag to compare

@github-actions github-actions released this 20 Sep 10:21

Nexium v1.0.2 — Annapurna: Terray

Annapurna: Terray — the one who carried the frostbitten summiters down: the hotfix. The x86-64 binaries of 1.0.0 and 1.0.1 were built for the CPU of the machine that built them and crashed on any other; every build is for the architecture's baseline now, and the release refuses one that is not. With it, the fuzzer's two fixes, UTF-8 on the Windows console, and the day's documentation.

Added

  • --cpu baseline|native|<name> and NX_CPU, the CPU a build without --target is for; nx doctor prints it. os.arch(), the architecture a program runs on.
  • Nexium programs print UTF-8 on the Windows console: the generated main switches the console to code page 65001 for the program's life and restores it at exit, so nx version shows Rébuffat rather than R├⌐buffat.
  • The roadmap's "tools only this language can have": nx explain for an effect's provenance, an effects lockfile for CI, proofs as editor code lenses, profiling by effect, record-and-replay tests, nx layout, the ownership trace, asking the checker for its facts, a binary-pattern debugger and workbench, hot reload, one-liners, REPL sessions as files, watch mode, snapshot tests, a Jupyter kernel and the playground, each pencilled into a minor.
  • The roadmap names what 1.0 is not yet (memory safety, maturity, numbers, ecosystem) and where each is answered; the numbers page (benchmarks against C, Rust, Go and Python, published on the site) moves from 1.6 to 1.1; a second maintainer and a list of packages are ecosystem items; the Always section commits to the corpus growing with the language, the sanitizers and the fuzzer on every release, and a patch within a week of a fix.
  • The README's Status section describes 1.0 (language-stable, early ecosystem, with the roadmap's ledger of what it is not yet) instead of the first implementation; the six translated READMEs are regenerated from the current English one, which had moved on to the self-hosted compiler, the site, the Topo, the editors and the 1.0 numbers while they still described cargo install and a Rust compiler.
  • The CI workflow skips a push that changes only prose and pictures; the Pages workflow builds the site from them and validates the changelog, so a roadmap edit no longer runs the compiler on three platforms. CONTRIBUTING.md says what runs on a push.
  • The roadmap's page zero: KNOWN_ISSUES.md is where every open bug waits with its fix, no theme starts over a bug a user can hit, and the four an outside review of 1.0.1 found (a contained panic leaks what it acquired, nexium.lock is never read, the Python wrapper drops writes through a list, effect notes miss their witness) are the 1.0.2 patch, with the wording fixes for SECURITY.md, the README and the package names; 1.3 begins by splitting check.nx.
  • The roadmap opens with the quick wins in order: twenty-nine items sorted by how soon each can ship (hours, a day or two, about a week), each landing as a patch or in 1.1 when done, ahead of the themes.
  • The roadmap's niche roads: the PowerShell one-liner (irm | iex), the one-C-file install (curl bootstrap/nx.c | cc), torrents with web seeds and magnet links, IPFS pins, nx install from a portable copy, portable mode, MSIX with an .appinstaller, gh release download and the configuration-management modules, and a QR code.
  • The roadmap's "every road in": the installation channels beyond the setup and the script, per platform (winget, Chocolatey, Scoop, MSI, MSIX; Homebrew, MacPorts, a notarized .pkg; apt and dnf repositories, PPA, COPR, OBS, AUR, Alpine, Nix, Guix, Snap; BSD ports), containers and dev containers, wheels and npm packages that carry the binary, version managers and nxup, the extension registries, and the same channels as targets of the installer artifact for Nexium programs.
  • The roadmap's 1.5 gains 32-bit architectures: i686 Windows and Linux, armv7, riscv32 and thumb, with the list of places 64 bits are assumed today (runtime handles and sizes, 64-bit binary segments on a 32-bit word, the compile-time interpreter's usize, the C header import's long and size_t), the cross-compiled test run in CI, the compiler self-hosted as 32-bit, and the tiers.
  • The roadmap's Topo as a course and the docs, more: exercises the compiler grades (fill in the blank, fix the error, write it), quizzes checked against nx effects and the recorded outputs, predict-the- output cards, code blocks that run in the page once the compiler runs in the browser, progress on the route map, more project chapters; std reference pages from nx doc, an error index, a cookbook, in-depth guides, a style guide, site search and docs per release.
  • The roadmap's "installer grown up": a setup mutex against two wizards at once, upgrade/repair/remove of an installed version, closing a running nx before files are replaced, checks for disk space, a pending reboot and antivirus quarantine, the toolchain choice, the wizard in six languages, Authenticode signing, logs and rollback, silent-install parameters and an MSI, an ARM64 setup, and a Check for updates entry.
  • The roadmap's clickable line: the REPL with an inspector window, :plot and :watch, the installer's editor page and nx upgrade, nx topo as an interactive tutorial runner, std.tui, the visual tools (size treemap, leak explorer, effect graph, ownership timeline), nexium-gui grown up, and the Hut, a native IDE in nexium-gui.

Fixed

  • The x86-64 release binaries of 1.0.0 and 1.0.1 crashed with an illegal instruction on machines without AVX-512 (nx version and nx doctor worked; anything that compiled did not): zig cc compiles for the CPU it runs on, and the release runner's had AVX-512. Every build without --target is now for the architecture's baseline (plain x86-64) unless --cpu native or NX_CPU asks for more; the bootstrap scripts do the same; the release workflow and CI refuse an x86-64 compiler that contains AVX instructions.
  • A module name used as a value (let x = math, var t = thread) crashed the checker with an index out of bounds; it is the diagnostic "math is a module, not a value" now (found by the fuzzer in CI).
  • A compile-time call chain that never bottoms out overflowed the compiler's stack (found by the fuzzer, which moved the call to fib into fib); the compile-time interpreter stops at 32 nested calls with a diagnostic. The limit is low because each nested call costs about 165 KiB of the compiler's stack; KNOWN_ISSUES.md has the fix that raises it.
  • The documentation site's menu no longer jumps back to the top on every page: it is its own scroll box, and a page load reset it, so reading the chapters in order meant scrolling the menu down again each time. The menu now keeps its position from page to page and brings the current page's entry into view when it is not.
  • The links under "Files" in the release notes were relative, so GitHub resolved them under the tag page and every one was a 404. The notes script writes the download URL now, and the notes of every release since 0.2.0 were corrected in place.

Install

Windows: run nexium-1.0.2-setup-x64.exe. It installs nx, a bundled Zig toolchain (the C compiler nx uses), the standard library, examples, docs, and the VS Code extension, and can add nx to your PATH. No other install is needed. A portable zip without the installer is nx-v1.0.2-aarch64-pc-windows-msvc.zip.

macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/Londopy/nexium/main/installers/install.sh | sh

This downloads nx-v1.0.2-aarch64-apple-darwin.tar.gz or nx-v1.0.2-x86_64-unknown-linux-gnu.tar.gz, verifies it against SHA256SUMS.txt, installs to ~/.nexium/bin, downloads Zig on Linux when no C compiler is present (macOS uses the Xcode command line tools), and adds the directory to your PATH. Set NEXIUM_VERSION=v1.0.2 to pin this release.

From source: sh bootstrap/build.sh with a C compiler (Zig, or cc on macOS) builds the compiler from its C seed; no Rust is needed.

VS Code: install nexium-v1.0.2.vsix with Extensions: Install from VSIX..., or let the Windows installer do it.

Then, in a new console:

nx doctor
nx run examples/hello.nx

Files

file size SHA-256
nexium-1.0.2-setup-x64.exe 49.5 MB 2b1e55270b25c4db77cd05f67dbbd4602c7e81d3f3e1f8a32944a60ce3cbef59
nexium-v1.0.2.vsix 9.8 KB ec2dfb9f5187633a9e3966190e608939e4ed8ab5c9c8f6d3a40695da1e5ab477
nx-v1.0.2-aarch64-apple-darwin.tar.gz 1.1 MB 3e754baea58c23db8329489f340e49ddb03eeeaaf4c3351d2afbd85b2bcd0a89
nx-v1.0.2-aarch64-pc-windows-msvc.zip 1.3 MB 3e125e34c2c34cb20f39341ecb8b06f9780a392d60cf70f20d91d422cccbf5fe
nx-v1.0.2-aarch64-unknown-linux-gnu.tar.gz 1.2 MB 6e842bb93e3a86845be24885ccd7bb3b1313542035ca1970f24d23f4b6351bc5
nx-v1.0.2-x86_64-pc-windows-msvc.zip 1.4 MB 05f7e5f95cece5f524064b2b51df7bae05b38e7747a389e96b07e984fb01d110
nx-v1.0.2-x86_64-unknown-linux-gnu.tar.gz 1.3 MB 4ef02ce94556b902941eb85aa2442cab38831728ca87d87b73fe4595d61b37b5

SHA256SUMS.txt holds the same values. Verify a download with:
...

Read more

Nexium v1.0.1 — Annapurna: Rébuffat

Choose a tag to compare

@github-actions github-actions released this 20 Sep 07:59

Do not install this release on x86-64. Its Windows and Linux nx binaries were built for the CPU of the machine that built them and crash with an illegal instruction on any machine without AVX-512 (nx version works; nothing that compiles does). Install v1.0.2 or later, which is built for the baseline of the architecture and runs anywhere. The macOS build is not affected.

Nexium v1.0.1 — Annapurna: Rébuffat

Annapurna: Rébuffat — the guide who roped the snow-blind party together on the descent: a patch that ties the loose ends after the summit. The fixes the tutorial found, the documentation site and the Topo, and support for eleven editors; the language is the same.

Added

  • Editor support beyond VS Code and Sublime Text, under editors/: Vim (syntax, indent, :NxRun and friends, :make), Neovim (a plugin that registers the tree-sitter parser, its queries and nx lsp with the built-in client), Helix (language config and queries in Helix's scopes, with indents and text objects), Zed (an extension with grammar, outline and the language server), Emacs (nexium-mode with Eglot and lsp-mode registration), Kate and the other KSyntaxHighlighting editors, Notepad++ (a User Defined Language), nano, and a guide for JetBrains IDEs (TextMate bundle plus LSP4IJ). CI loads or compiles every one of them.
  • The documentation site, londopy.github.io/nexium, built by site/build.nx, a Nexium program that renders the Markdown in the repository (the docs, the project files, the tutorial) with the language's own token rules for highlighting, and published by a Pages workflow on every push. The test harness builds it.
  • The Topo, topo/: a 23-chapter tutorial from installing the compiler to a neural network, a GUI, a network service and a library shipped to C, Python and Node. Every program in it (topo/code/) is run by the harness against its recorded output, and the diagnostics it shows are recorded too. Writing it found the bugs below.
  • The documentation site on a phone: one column with the navigation behind a Menu button, tables that scroll sideways instead of widening the page, grids and code blocks that stay inside the screen, larger touch targets, and a theme colour for the browser chrome. Every page is checked at 375 pixels wide.
  • assets/social-preview.svg and its 1280x640 PNG, the card GitHub and the chat apps show for a link to the repository (uploaded under the repository's settings); every page of the documentation site carries Open Graph tags pointing at it.
  • The roadmap's 1.7, the seam both ways: Python (strings, NumPy without copies, dataclasses and exception classes from the Nexium types, ref class handles, callbacks, a CPython extension wheel, Python from Nexium), Rust (error sets as enums, strings and handles, no_std crates, source crates, Rust crates from Nexium), C++, Go, Java and Kotlin, C#, Ruby, Lua, Swift and the browser as artifact kinds, a versioned ABI document, buffers that leave, nx ship --abi-check, and @cImport accepting more of C. Release name Annapurna II; Gangapurna moves to 1.8.
  • The roadmap's 1.2, memory safety without a garbage collector: the view rules V1 to V5 (returning, storing, growth, moving, arenas), unsafe for what the checker cannot prove, what stays (moves, scope-exit destruction, reference counting, weak, leak detection) and how the rules roll out under the stability policy, which now says that undefined behaviour may become an error in a minor. The later themes move down one number.

Fixed

  • A function checked on demand while a constant was evaluated at compile time could name a global before its type was resolved, and the checker crashed on the unresolved type (found by the fuzzer on its second run in CI). A global's type now resolves on first use; the program gets the diagnostic for the compile-time global access instead.
  • A bare break, continue or return ends a match arm before the comma (_ => break, parsed the comma as an expression). A one-element array literal can be indexed and sliced ([x][..], [x][0]): only a [ that opens []T or [N]T with a type after it starts an array type in expression position.
  • Set!T widens into !T where !T is expected (an initializer, an argument, a return); !T never narrows into a named set. Type names now spell a named set (Parse!i32), so the diagnostic no longer reads "expected !i32 but found !i32".
  • The !effect diagnostic's first note points at the call that brings the effect in, not at the function's header.
  • Two dangling views, found by running the tutorial's programs on Linux and the compiler under AddressSanitizer: std.http.parse_url kept the host as a view of a value that was released when the if let ended, so every URL with a port could fail with NotFound where the freed memory was reused; and the checker read a syntax node through a pointer after adding nodes to the tree (a binary pattern with a computed size). Both are the case the roadmap's 1.2 makes an error; a CI job now builds the compiler with the sanitizers, checks every source with it, and runs every spec case and tutorial program built with them.
  • for k in m over a Map emitted C that did not compile: the keys are collected into an owned List the loop walks and releases, the same as for k in m.keys(). m[key] crashed the emitter; it is the lookup m.get(key) is. Both have a spec case now.
  • @weak(x) did not parse (weak is a keyword); a builtin may be spelled with one. A weak reference created in a struct literal was retained a second time on its way into the field and its storage never freed; and an object whose fields held a weak reference back to it could be freed while its own fields were still being released. A ref class now holds its storage until its fields are gone; both cases are spec cases.

Install

Windows: run nexium-1.0.1-setup-x64.exe. It installs nx, a bundled Zig toolchain (the C compiler nx uses), the standard library, examples, docs, and the VS Code extension, and can add nx to your PATH. No other install is needed. A portable zip without the installer is nx-v1.0.1-aarch64-pc-windows-msvc.zip.

macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/Londopy/nexium/main/installers/install.sh | sh

This downloads nx-v1.0.1-aarch64-apple-darwin.tar.gz or nx-v1.0.1-x86_64-unknown-linux-gnu.tar.gz, verifies it against SHA256SUMS.txt, installs to ~/.nexium/bin, downloads Zig on Linux when no C compiler is present (macOS uses the Xcode command line tools), and adds the directory to your PATH. Set NEXIUM_VERSION=v1.0.1 to pin this release.

From source: sh bootstrap/build.sh with a C compiler (Zig, or cc on macOS) builds the compiler from its C seed; no Rust is needed.

VS Code: install nexium-v1.0.1.vsix with Extensions: Install from VSIX..., or let the Windows installer do it.

Then, in a new console:

nx doctor
nx run examples/hello.nx

Files

file size SHA-256
nexium-1.0.1-setup-x64.exe 49.5 MB 6d5581b9f4dae012178c720ba227ae3c5f9e498b9f35b26c90ba29ece7849504
nexium-v1.0.1.vsix 9.8 KB 3d4ba916efbb10930e8e3e85667cf7f22f9e43dc4f5e1a8d02adb65c91ef29c0
nx-v1.0.1-aarch64-apple-darwin.tar.gz 1.1 MB 4aac677e3e9fe850ae58b4b6542836f5fe8b937e389201102616ccd66b81765e
nx-v1.0.1-aarch64-pc-windows-msvc.zip 1.2 MB 150ad5ce1408d10a0d73ef83e43af861ac9d209544137ff2e1707b262f3c3a0e
nx-v1.0.1-aarch64-unknown-linux-gnu.tar.gz 1.2 MB c072b6479259443544bf8990e307bc335fbafddca3b3bc9c2af26598ea3a39e6
nx-v1.0.1-x86_64-pc-windows-msvc.zip 1.4 MB 753dd5d456d1c83d2d8655a9a6344eaeb57870e6df9897857f2f3181e069e78c
nx-v1.0.1-x86_64-unknown-linux-gnu.tar.gz 1.3 MB 2655f87e3a5f8da7ab81dd8a00472b681626a9635ba67a7350c6f47f6d8da080

SHA256SUMS.txt holds the same values. Verify a download with:

sha256sum -c SHA256SUMS.txt --ignore-missing      # Linux
shasum -a 256 -c SHA256SUMS.txt --ignore-missing   # macOS
Get-FileHash .\nexium-1.0.1-setup-x64.exe -Algorithm SHA256   # Windows, compare with the table

Requirements

  • Windows 10 or later, x64. macOS on Apple Silicon. Linux x86_64 with glibc. Builds for aarch64 Linux and Windows on ARM are attached too; they are tier 2 (built, not tested in CI; see docs/platforms.md).
  • A C compiler is needed to build programs: the Windows installer and the macOS/Linux script take care of it. Otherwise put Zig on your PATH, or set NX_CC.

Nexium v1.0.0 — Annapurna: Summit

Choose a tag to compare

@github-actions github-actions released this 20 Sep 05:07

Do not install this release on x86-64. Its Windows and Linux nx binaries were built for the CPU of the machine that built them and crash with an illegal instruction on any machine without AVX-512 (nx version works; nothing that compiles does). Install v1.0.2 or later, which is built for the baseline of the architecture and runs anywhere. The macOS build is not affected.

Nexium v1.0.0 — Annapurna: Summit

Annapurna: Summit — the top of the mountain the project has been on since 0.1: the language stops changing under people's feet, the compiler is written in itself, and nothing but Nexium, one C file and a runtime header is left.

Changed

  • The architecture tour (docs/architecture.md) names the files under self/; the specification's status table and the roadmap record that the port is complete.

Fixed

  • The fuzzer wrote its cases under nx-out/fuzz, the path of its own executable on Linux and macOS, so CI's fuzz job could not start; it works under nx-out/fuzzing.

Removed

  • The first compiler, written in Rust (bootstrap/rust/, Cargo.toml, Cargo.lock), and with it the last Rust toolchain use in CI: the lint job now runs nx fmt --check on the tree and nx check on the compiler, the harness and the fuzzer. The repository is Nexium, one generated C file, and the runtime header (decision 90). The git history keeps the crate.

Install

Windows: run nexium-1.0.0-setup-x64.exe. It installs nx, a bundled Zig toolchain (the C compiler nx uses), the standard library, examples, docs, and the VS Code extension, and can add nx to your PATH. No other install is needed. A portable zip without the installer is nx-v1.0.0-aarch64-pc-windows-msvc.zip.

macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/Londopy/nexium/main/installers/install.sh | sh

This downloads nx-v1.0.0-aarch64-apple-darwin.tar.gz or nx-v1.0.0-x86_64-unknown-linux-gnu.tar.gz, verifies it against SHA256SUMS.txt, installs to ~/.nexium/bin, downloads Zig on Linux when no C compiler is present (macOS uses the Xcode command line tools), and adds the directory to your PATH. Set NEXIUM_VERSION=v1.0.0 to pin this release.

From source: sh bootstrap/build.sh with a C compiler (Zig, or cc on macOS) builds the compiler from its C seed; no Rust is needed.

VS Code: install nexium-v1.0.0.vsix with Extensions: Install from VSIX..., or let the Windows installer do it.

Then, in a new console:

nx doctor
nx run examples/hello.nx

Files

file size SHA-256
nexium-1.0.0-setup-x64.exe 49.5 MB 73c1e2f91ea95f4027f10b20eeedc131666b9d9e92ac51a234ab431c6fa944a1
nexium-v1.0.0.vsix 9.8 KB 9ec745598b40e8afc4d62f4d7368e29bdb9fe74b0c13a3b4625c2fd8a9e225c4
nx-v1.0.0-aarch64-apple-darwin.tar.gz 1.1 MB 093690bf5806bbe2b25b9a314a746222bf2859e7c221a8017fd74b9dc43b6d65
nx-v1.0.0-aarch64-pc-windows-msvc.zip 1.2 MB ac707a315aea82151d5be7043ae891674d985b449d97ab7b2f6f85d78f6277ee
nx-v1.0.0-aarch64-unknown-linux-gnu.tar.gz 1.2 MB aa7b3ccd267c741ba2c584aa69ece30a78b7e889ed6e27ad102e7b25c55b39c1
nx-v1.0.0-x86_64-pc-windows-msvc.zip 1.4 MB 3f4dd1938a894c9be2662477bdb35a9874bd1b9205767fea87996be0cf5e7d78
nx-v1.0.0-x86_64-unknown-linux-gnu.tar.gz 1.3 MB 47d62c1db321a3e8a4f86a4dbafa54aa303d8d2fc15c6202ff78e3001d0054da

SHA256SUMS.txt holds the same values. Verify a download with:

sha256sum -c SHA256SUMS.txt --ignore-missing      # Linux
shasum -a 256 -c SHA256SUMS.txt --ignore-missing   # macOS
Get-FileHash .\nexium-1.0.0-setup-x64.exe -Algorithm SHA256   # Windows, compare with the table

Requirements

  • Windows 10 or later, x64. macOS on Apple Silicon. Linux x86_64 with glibc. Builds for aarch64 Linux and Windows on ARM are attached too; they are tier 2 (built, not tested in CI; see docs/platforms.md).
  • A C compiler is needed to build programs: the Windows installer and the macOS/Linux script take care of it. Otherwise put Zig on your PATH, or set NX_CC.

Nexium v0.9.0 — Annapurna: Summit Ridge

Choose a tag to compare

@github-actions github-actions released this 20 Sep 04:53

Nexium v0.9.0 — Annapurna: Summit Ridge

Annapurna: Summit Ridge — the last ridge, nothing left but walking up: every tool in Nexium, the shipped nx the Nexium one, a harness and a fuzzer in Nexium, the stability policy and the tiers.

Added

  • nx fmt in Nexium (self/fmt.nx, a command of self/nx.nx): the formatter, byte for byte the same as the first one on every source in the tree with its layout disturbed, which cargo test checks while the Rust one exists. The lexer keeps // comments as tokens on request.
  • nx effects, audit, refcounts, leaks, size, version and doctor in Nexium (self/tools.nx, self/size.nx): the reports over the checked program and the section-table reader for ELF64 and COFF binaries, matching the frozen Rust commands on every example except where the Nexium compiler does better (dyn and fn types printed as written, recursive functions showing unbounded_stack).
  • nx doc in Nexium (self/doc.nx): the same page as the first generator on every source, apart from a function's effects coming from its own module and generic functions saying so instead of showing one instantiation. The parser keeps each /// run's text (Tree.docs).
  • Packages in Nexium (self/manifest.nx): the nexium.toml subset, nx init, nx add, nx fetch and the lock file; the loader resolves import dep and import dep.module through the manifest and scopes a package's own imports to its src.
  • nx ship in Nexium (self/ship.nx, self/ship_node.nx, self/installer.nx): the C header, shared and static libraries, the Python package and wheel, the Rust crate, the npm package and the installers, from the export records cgen.nx writes as it emits each wrapper. The header and typings carry each function's /// comment.
  • nx lsp in Nexium (self/lsp.nx): the language server over stdio, with diagnostics, hover, go to definition, completion and rename, and the editor-module loader and IDE queries behind it; cargo test drives it the way an editor does.
  • nx repl in Nexium (self/repl.nx): the interactive session on the compile-time interpreter, which in REPL mode may print, read the console, touch files, the clock and randomness (check.nx repl_mode, run_repl, values rendered by their types). nx alone at a terminal opens it. The last tool leaves the Rust crate.
  • io.is_terminal(h), os.set_env(name, value) and os.exe_path(); with the last, nx finds a Zig bundled next to it (<dir>/zig/zig or <dir>/../zig/zig), as the Rust driver did. The driver gives each build its own Zig cache under the output directory when ZIG_LOCAL_CACHE_DIR is not set, as the Rust driver did, since Zig's cache is not safe against several zig cc starting at once on Windows.
  • The seed bootstrap/nx.c is regenerated when self/ needs a builtin the seed lacks, not only at a release.
  • The test harness is a Nexium program, tests/run.nx: it builds the compiler from the seed (when the sources are newer than it), checks the fixed point, and runs the examples, the spec cases, the compile-fail cases, fmt --check on the tree, the standard library's tests, the GUI, packages, ship, the installer, the REPL and the language server, the cases on several threads. cargo test and the Rust harness retire; CI's test jobs have no Rust toolchain. On Windows a program run through process may be named with forward slashes.
  • The stability policy, docs/stability.md: what a patch, a minor and a major may change from 1.0 on, the deprecation cycle, what is not covered, and the C toolchain policy. nx fix FILE... applies the deprecations the compiler can migrate mechanically; there are none yet.
  • The platform tiers, docs/platforms.md: tier 1 is built, tested and released (x86_64 Linux and Windows, Apple Silicon); tier 2 is built and released, not tested (aarch64 Linux, Windows on ARM), cross-compiled from the same C in the release workflow and picked by the install script on an ARM Linux; tier 3 is whatever Zig targets.
  • Fuzzing, tests/fuzz.nx: mutated corpus sources through the front end and random bytes through the binary pattern engine (tests/fuzz_patterns.nx); a crash, a signal or a hang is a finding, saved for the report. CI runs it on every push with a fresh seed.
  • Releases ship the compiler written in Nexium: the release workflow builds it from the C seed on each platform with Zig alone (cc on macOS), checks the tag against self/nx.nx, and packages that binary in the archives and the Windows installer. Building from source is sh bootstrap/build.sh; no Rust is needed.

Fixed

  • if let v = opt over a place (a local, a field, an element) bound a bitwise copy of the payload that could then be moved on, so the optional and the binding both freed it. The binding is now a view of the payload, like a loop variable: moving out of it is an error with a .clone() / .? hint, while a binding over an owned temporary (a call result) still takes the payload. The comptime interpreter and the language server had such copies.
  • Reading standard input through std.stream.Reader blocked until 64 KiB arrived or the pipe closed, since fread fills its whole count; the runtime now reads the descriptor and hands over what the pipe has, so a server on stdin answers each message as it comes. io.read_line and the reader share one buffer. Standard input is binary on Windows, like the other two streams.

Install

Windows: run nexium-0.9.0-setup-x64.exe. It installs nx, a bundled Zig toolchain (the C compiler nx uses), the standard library, examples, docs, and the VS Code extension, and can add nx to your PATH. No other install is needed. A portable zip without the installer is nx-v0.9.0-aarch64-pc-windows-msvc.zip.

macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/Londopy/nexium/main/installers/install.sh | sh

This downloads nx-v0.9.0-aarch64-apple-darwin.tar.gz or nx-v0.9.0-x86_64-unknown-linux-gnu.tar.gz, verifies it against SHA256SUMS.txt, installs to ~/.nexium/bin, downloads Zig on Linux when no C compiler is present (macOS uses the Xcode command line tools), and adds the directory to your PATH. Set NEXIUM_VERSION=v0.9.0 to pin this release.

From source: sh bootstrap/build.sh with a C compiler (Zig, or cc on macOS) builds the compiler from its C seed; no Rust is needed.

VS Code: install nexium-v0.9.0.vsix with Extensions: Install from VSIX..., or let the Windows installer do it.

Then, in a new console:

nx doctor
nx run examples/hello.nx

Files

file size SHA-256
nexium-0.9.0-setup-x64.exe 49.5 MB 12d316932811c5fe5aeb7926371d5863c627bb1ebe76576a855c4aa6b692bc35
nexium-v0.9.0.vsix 9.8 KB ec72342a117088dd13b26b5c67856672aa2734146fad305759d344240aea449e
nx-v0.9.0-aarch64-apple-darwin.tar.gz 1.1 MB ac570c6aacdfd1680dda2092ceed5e68381aebd64cbf62502c1740a31f091b9b
nx-v0.9.0-aarch64-pc-windows-msvc.zip 1.2 MB 334f423da282ba53deff2c0f94b541f7cdf02f91cf9f767c7b676b78eac4f034
nx-v0.9.0-aarch64-unknown-linux-gnu.tar.gz 1.2 MB 498644bedd330a2462354b7b95627d75c0413062b0606847181addaf27f07f59
nx-v0.9.0-x86_64-pc-windows-msvc.zip 1.4 MB 08486ef7e97663f577a7fe4f30d42b125a22d129972b162aac8d1283d7a810bf
nx-v0.9.0-x86_64-unknown-linux-gnu.tar.gz 1.3 MB 537926c8ffaacdc710dc1f35233270342bc75d9367382b98d6210dc524c6425c

SHA256SUMS.txt holds the same values. Verify a download with:

sha256sum -c SHA256SUMS.txt --ignore-missing      # Linux
shasum -a 256 -c SHA256SUMS.txt --ignore-missing   # macOS
Get-FileHash .\nexium-0.9.0-setup-x64.exe -Algorithm SHA256   # Windows, compare with the table

Requirements

  • Windows 10 or later, x64. macOS on Apple Silicon. Linux x86_64 with glibc. Builds for aarch64 Linux and Windows on ARM are attached too; they are tier 2 (built, not tested in CI; see docs/platforms.md).
  • A C compiler is needed to build programs: the Windows installer and the macOS/Linux script take care of it. Otherwise put Zig on your PATH, or set NX_CC.

Nexium v0.8.0 — Annapurna: the Sickle

Choose a tag to compare

@github-actions github-actions released this 20 Sep 01:58

Nexium v0.8.0 — Annapurna: the Sickle

Annapurna: the Sickle — the exposed glacier crossing below the summit: the compiler in Nexium is the compiler, and builds from its own C with no Rust.

Added

  • unbounded_stack is an effect, no longer reserved: a function on a cycle of the call graph (it calls itself, or calls something that calls it back) carries it, because its stack use depends on its input; calls through function values and trait objects acquire it as they acquire every permitted effect. !unbounded_stack is discharged by rewriting the recursion as a loop over an explicit stack (SPEC 9). The first language change made in the compiler in Nexium alone.
  • The compiler in Nexium renders diagnostics as the tools always have: the message, --> path:line:col, the source line, a caret, notes under their error, and the count at the end; it printed byte offsets.

Changed

  • The compiler written in Nexium is the compiler (decision 90). The first compiler, in Rust, is frozen at 0.7 semantics and moved to bootstrap/rust/; it still builds and still holds the tools not yet ported (fmt, doc, lsp, ship, packages, the REPL), and leaves at 1.0. A machine with no nx builds one from bootstrap/nx.c, the C the compiler emits for itself, with any C compiler and no Rust (bootstrap/build.sh, build.ps1); CI does so on three platforms with no Rust toolchain. cargo test builds the compiler from the seed and runs every example, spec case and compile-fail case through it; the oracle diffs that drove the port (nx tokens, sexp, tir and emit-c compared between the two compilers) retire.

Fixed

  • The compiler in Nexium searched no directory for @cImport headers and vendored C when the file was named without a path (nx build demo.nx from inside gui/); the file's directory is . in that case, as in the Rust compiler.

Removed

  • layout(packed) and soa on structs, and the pool and stack allocation strategies, are gone from the specification (decision 88): layout(c) and using arena are what the language has. The two struct spellings used to be accepted and silently ignored; they are errors now. Region rule R1 is the region rule; the cases it does not cover are listed in SPEC 5.6, and a debug build now fills freed storage with 0xDD so a view that outlived its storage does not read the old contents by luck.

Install

Windows: run nexium-0.8.0-setup-x64.exe. It installs nx, a bundled Zig toolchain (the C compiler nx uses), the standard library, examples, docs, and the VS Code extension, and can add nx to your PATH. No other install is needed. A portable zip without the installer is nx-v0.8.0-x86_64-pc-windows-msvc.zip.

macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/Londopy/nexium/main/installers/install.sh | sh

This downloads nx-v0.8.0-aarch64-apple-darwin.tar.gz or nx-v0.8.0-x86_64-unknown-linux-gnu.tar.gz, verifies it against SHA256SUMS.txt, installs to ~/.nexium/bin, downloads Zig on Linux when no C compiler is present (macOS uses the Xcode command line tools), and adds the directory to your PATH. Set NEXIUM_VERSION=v0.8.0 to pin this release.

From source (Rust 1.75+): cargo install nexium

VS Code: install nexium-v0.8.0.vsix with Extensions: Install from VSIX..., or let the Windows installer do it.

Then, in a new console:

nx doctor
nx run examples/hello.nx

Files

file size SHA-256
nexium-0.8.0-setup-x64.exe 49.6 MB ee691a97cc189b88488036cfa4d6f6c9b1d1088547a78cf97ad2e59e4b3ebed6
nexium-v0.8.0.vsix 9.8 KB bed8dc24ad7f67b5c21cba56c86a1202e66fe4fb302190102680a2f7067484de
nx-v0.8.0-aarch64-apple-darwin.tar.gz 1.5 MB c5160925ec767cbb9ffd68190fb2b2500f41e6188deb241728e5b9841c6dd62b
nx-v0.8.0-x86_64-pc-windows-msvc.zip 1.7 MB 68fafdf923c1cd1d700022bc9ba632970801e88b02f842e4c7ebb1ea488606d7
nx-v0.8.0-x86_64-unknown-linux-gnu.tar.gz 1.7 MB db1ad952a79269b2044de3292a3d5c9d46f51a5b798ca03807843c822517d8e5

SHA256SUMS.txt holds the same values. Verify a download with:

sha256sum -c SHA256SUMS.txt --ignore-missing      # Linux
shasum -a 256 -c SHA256SUMS.txt --ignore-missing   # macOS
Get-FileHash .\nexium-0.8.0-setup-x64.exe -Algorithm SHA256   # Windows, compare with the table

Requirements

  • Windows 10 or later, x64. macOS on Apple Silicon. Linux x86_64 with glibc.
  • A C compiler is needed to build programs: the Windows installer and the macOS/Linux script take care of it. Otherwise put Zig on your PATH, or set NX_CC.

Nexium v0.7.0 — Annapurna: Camp V

Choose a tag to compare

@github-actions github-actions released this 20 Sep 00:03

Nexium v0.7.0

Added

  • self/check.nx checks closures: parameter and return types from the expected function type, by-value and by-reference captures, inferred return types; and records: constraint checks, compile-time decisions on constant fields, Record.new; and trait objects: vtables, dyn coercions, dynamic calls, effect bounds on function values. examples/generics.nx, examples/tests.nx, examples/tour.nx, examples/records.nx, examples/dyn.nx and std/thread.nx join the body comparison; and binary patterns and construction: examples/binary.nx and examples/binary_sizes.nx join too (46 sources).
  • examples/records.nx: compile-time, .new and run-time constraint checks.
  • examples/binary_sizes.nx: float, signed, little-endian and computed-size segments, a remainder written back out.
  • self/check.nx evaluates at compile time: an interpreter over the typed IR runs constants, globals, comptime expressions, comptime test blocks and record constraints; examples/comptime.nx (a CRC table, primes, strings and structs computed at compile time) joins the comparison (50 sources: every example and std module but @cImport users).
  • A constant slice whose elements were computed at compile time is stored as a static array; only string literals could back a constant slice.
  • self/check.nx reports the diagnostics-only passes: declared effect bounds against inferred effects, for parallel bodies mutating shared state, mutable globals in embeddable libraries, own on copied types and on exported or fn-value functions, moves out of map lookups, match exhaustiveness, returned views into locals. cargo test runs it over every compile-fail case and expects every message the Rust checker gives.
  • self/cimport.nx, the C header importer in Nexium, and @cImport in self/check.nx: every source in the tree now matches the oracle, examples/cimport.nx and nexium-gui included (54 sources).
  • self/cgen.nx, the C emitter in Nexium: byte-identical to nx emit-c on every source in the tree (54, its own 96k-line translation unit included); cargo test diffs them.
  • The bootstrap closes: nx1 (the emitter in Nexium, built by the Rust compiler) emits the C of itself, zig cc builds nx2 from it with no Rust involved, and nx2 emits byte-identical C for itself and other programs. cargo test performs the three stages.
  • tests/spec: the specification's conformance cases, one program per claim SPEC.md makes with its recorded output and exit code, run by cargo test and diffed through every self-hosting stage; sections 2 to 14 (artifacts and the toolchain are covered by the ship tests).
  • self/nx.nx, the nx driver in Nexium: build, run, test, check, emit-c and tir over the self-hosted pipeline, invoking the C compiler as the Rust driver does; the standard library is embedded in it. It builds itself, and the result builds and runs programs (cargo test checks that). Nothing past the first compiler needs cargo.

Fixed

  • Color.Green as u8 (a unit enum cast to an integer) emitted a C cast of the whole struct, which the C compiler rejected; it is the tag now.
  • let d: i8 = -128 is accepted: a negative literal is one literal, not the negation of 128 (which does not fit an i8).
  • A labeled block that ends in break :label value has the value's type; it was never, and printing the value was rejected.
  • A break inside an orelse default, a call argument or any other nested expression now ends a while true; a non-void function that ended in such a loop was accepted without a return value.
  • A binary segment sized by an expression (payload:len*8) is in bits like a constant size; the generated C and the compile-time interpreter scaled it by eight again, so such patterns never matched and such constructions wrote past the intended width.
  • A !void tail expression (a match whose arms print, a call) at the end of a function returning !void is returned; it was reported as unused.
  • % on floats compiles: the generated C applied the integer operator to doubles and the C compiler rejected it; it is fmod now.
  • A constant of List, String, Map, ref class or weak type (or one containing them) is rejected with a hint to store a slice; it used to fail in the C compiler, or worse, be freed by whoever copied it.
  • Slicing an empty slice (text[..], "".split(","), an empty binary pattern) added an offset to a null pointer, which is undefined in C: a debug build made by zig 0.14 trapped with "applying zero offset to null pointer". The generated C goes through nx_padd, which skips the add.
  • if t < 1000 and t > -1000 { t + 1 }: both halves of an and guard narrow the range; the second fact used to replace the first, so the addition was not proven and a !panics bound on the function failed.
  • An array indexed by the index of a for x, i in xs over it is proven in bounds; the proof was skipped for arrays.
  • self/check.nx kept range facts on a var only until its next assignment was checked, so a guarded t = t - 10 was not proven; the facts now hold while the right side is checked, as in the Rust checker.
  • The generated C no longer collides with macOS's mach headers, which define ts_32 and friends as macros: a local named ts at slot 32 failed to compile on macOS.
  • @cImport retries a preprocessor run that failed without a diagnostic and reports the exit code when it keeps failing, instead of an empty message.
  • self/cimport.nx imported hexadecimal float macros (macOS's MAXFLOAT) that the Rust importer skips, so the two disagreed on <math.h> there; neither imports them now.
  • self/nx.nx links native macOS builds with the system compiler, as the Rust driver does (zig 0.14 cannot link against the current Xcode SDK); cargo test builds the bootstrap's second stage with that compiler too.
  • The tree-sitter grammar parses x orelse return null and the other jumps after orelse and catch, and /little-signed segment modifiers.
  • List(thread.Worker(Job)): a generic type of another module takes its type arguments from the caller's scope, and is accepted in expression position (List(thread.Worker(Job)).new()). The arguments were looked up in the other module ("cannot find type Job"), and the expression form was rejected as not a type.

Install

Windows: run nexium-0.7.0-setup-x64.exe. It installs nx, a bundled Zig toolchain (the C compiler nx uses), the standard library, examples, docs, and the VS Code extension, and can add nx to your PATH. No other install is needed. A portable zip without the installer is nx-v0.7.0-x86_64-pc-windows-msvc.zip.

macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/Londopy/nexium/main/installers/install.sh | sh

This downloads nx-v0.7.0-aarch64-apple-darwin.tar.gz or nx-v0.7.0-x86_64-unknown-linux-gnu.tar.gz, verifies it against SHA256SUMS.txt, installs to ~/.nexium/bin, downloads Zig on Linux when no C compiler is present (macOS uses the Xcode command line tools), and adds the directory to your PATH. Set NEXIUM_VERSION=v0.7.0 to pin this release.

From source (Rust 1.75+): cargo install nexium

VS Code: install nexium-v0.7.0.vsix with Extensions: Install from VSIX..., or let the Windows installer do it.

Then, in a new console:

nx doctor
nx run examples/hello.nx

Files

file size SHA-256
nexium-0.7.0-setup-x64.exe 49.6 MB b3f15f67014d50a84587cd7a4784a9a0e272bac0f16131444dc56eb2815c8cb0
nexium-v0.7.0.vsix 9.8 KB d732c868e190f61e60359c4c9eb2ddc0245b7610f3121b97faaaac9e26556089
nx-v0.7.0-aarch64-apple-darwin.tar.gz 1.5 MB 439bbe8de91a28a9e30073a75737c7a645fd0db43e28cbc4bb0672f60785793d
nx-v0.7.0-x86_64-pc-windows-msvc.zip 1.7 MB 8ab306bbea65471c476d7eb2474233dbd502d1c491243075fe23dac74052a5a8
nx-v0.7.0-x86_64-unknown-linux-gnu.tar.gz 1.7 MB 34318cf286a55856ec7d63d311a62d9b04cdd82e75b5d8c024644b8b3c3feb9a

SHA256SUMS.txt holds the same values. Verify a download with:

sha256sum -c SHA256SUMS.txt --ignore-missing      # Linux
shasum -a 256 -c SHA256SUMS.txt --ignore-missing   # macOS
Get-FileHash .\nexium-0.7.0-setup-x64.exe -Algorithm SHA256   # Windows, compare with the table

Requirements

  • Windows 10 or later, x64. macOS on Apple Silicon. Linux x86_64 with glibc.
  • A C compiler is needed to build programs: the Windows installer and the macOS/Linux script take care of it. Otherwise put Zig on your PATH, or set NX_CC.

Nexium v0.6.1 — Annapurna: Lachenal

Choose a tag to compare

@github-actions github-actions released this 19 Sep 20:46

Nexium v0.6.1

Added

  • nx tir: the checked program as S-expressions, the oracle for the self-hosted checker; --sigs prints declarations and signatures only.
  • self/check.nx, the checker in Nexium: module loading, declarations, type interning, signatures (cargo test diffs --sigs over 41 sources), and function bodies: statements, expressions, calls, builtin methods and namespaces, matches and patterns, casts, coercions, ownership moves and the range analysis. It produces the oracle's exact typed IR for 35 sources, itself among them; generics, closures, trait objects, binary patterns, compile-time calls and C imports remain.

Fixed

  • A C compilation that fails because Zig's shared cache was being written by another nx at the same time ("failed to check cache") is retried, so parallel builds on Windows no longer fail at random.
  • The formatter spaces bit-or like the other operators (a | b, not a| b) and no longer glues -> !List(T) {; closure bars are classified per line so a bit-or inside a closure body is not taken for its closing bar.
  • A String built for the right side of and/or produced C that did not compile (its release was emitted outside the block that declared it).
  • i128 range bounds overflowed inside the compiler; an i128 literal beyond i64 was emitted as undefined C for the minimum; parse_int rejected values above 2^65.
  • A range fact from an if guard (if i == 1 { ... }) outlived its block and could prove a later xs[i] in range, eliding its bounds check.
  • return xs[i] into a ?T or !T moved the element without a clone, and a diverging orelse default or catch handler marked its operand moved.
  • Floats print as the shortest text that reads back exactly (3.141592653589793, not 3.1415926535897931).
  • The tree-sitter parser is regenerated for 0.6.0 (its version is embedded).

Install

Windows: run nexium-0.6.1-setup-x64.exe. It installs nx, a bundled Zig toolchain (the C compiler nx uses), the standard library, examples, docs, and the VS Code extension, and can add nx to your PATH. No other install is needed. A portable zip without the installer is nx-v0.6.1-x86_64-pc-windows-msvc.zip.

macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/Londopy/nexium/main/installers/install.sh | sh

This downloads nx-v0.6.1-aarch64-apple-darwin.tar.gz or nx-v0.6.1-x86_64-unknown-linux-gnu.tar.gz, verifies it against SHA256SUMS.txt, installs to ~/.nexium/bin, downloads Zig on Linux when no C compiler is present (macOS uses the Xcode command line tools), and adds the directory to your PATH. Set NEXIUM_VERSION=v0.6.1 to pin this release.

From source (Rust 1.75+): cargo install nexium

VS Code: install nexium-v0.6.1.vsix with Extensions: Install from VSIX..., or let the Windows installer do it.

Then, in a new console:

nx doctor
nx run examples/hello.nx

Files

file size SHA-256
nexium-0.6.1-setup-x64.exe 49.6 MB 18caa77e2a9154638742d0eb591fc04667a9060502e9f20a9d08189984863b7b
nexium-v0.6.1.vsix 9.8 KB ed1191119b97dd6f3bdd5a9c94a317bd191770b3c45ebc5321d8bf0f552b7d0d
nx-v0.6.1-aarch64-apple-darwin.tar.gz 1.5 MB eaa09f654fcc34f600ef181d12f348a6b9849a58c5294d57d15117db78505352
nx-v0.6.1-x86_64-pc-windows-msvc.zip 1.6 MB 2bac73223df9b5285bc5c2cf4d59d4cd71e02ac2e5506d042331f99e341c6c6e
nx-v0.6.1-x86_64-unknown-linux-gnu.tar.gz 1.7 MB 07f77c3239e2bee414c3a2880ce1f92c48d4c354ad7e233507c98a67803bd7fe

SHA256SUMS.txt holds the same values. Verify a download with:

sha256sum -c SHA256SUMS.txt --ignore-missing      # Linux
shasum -a 256 -c SHA256SUMS.txt --ignore-missing   # macOS
Get-FileHash .\nexium-0.6.1-setup-x64.exe -Algorithm SHA256   # Windows, compare with the table

Requirements

  • Windows 10 or later, x64. macOS on Apple Silicon. Linux x86_64 with glibc.
  • A C compiler is needed to build programs: the Windows installer and the macOS/Linux script take care of it. Otherwise put Zig on your PATH, or set NX_CC.

Nexium v0.6.0 — Annapurna: Camp IV

Choose a tag to compare

@github-actions github-actions released this 19 Sep 19:07

Nexium v0.6.0

Added

  • self/parser.nx: the parser written in Nexium now parses the 0.6 syntax and prints the same tree as nx sexp for every example, std module, GUI and self-hosting source; cargo test diffs the two (roadmap phase 4).

Changed

  • Breaking: control flow drops its parentheses and bodies always take braces (decision 87). if c { }, while c { }, for x, i in items { }, for i in lo..hi step s { }, for parallel x in items { }, and if let v = opt { } replace if (c), while (c), for (items) |x, i|, and if (opt) |v|. The one-statement forms become braced one-liners: if c { return v }, let m = if a > b { a } else { b }. A struct literal in a condition needs parentheses (if (Point{ .x = 1 }) == p { }). Match-arm guards are pat if cond =>. catch |e| and closure parameters are unchanged.
  • nx fmt migrates 0.5 sources to the new syntax as part of formatting; nx fmt --migrate-only upgrades the syntax and leaves the layout alone. The migration edits by token span, keeps comments and blank lines, and is idempotent, so running it on a mixed tree is safe.
  • The formatter puts a space before the body brace of any control head (if k == Kind.Defer {), where before an uppercase name would have been glued to { as a struct literal.
  • The language server resolves for bindings and if let bindings to their declaration.
  • The tree-sitter grammar, the VS Code and Sublime syntaxes, every example, the standard library, the GUI, the self-hosting sources, and all documentation (including the translations) use the new syntax.
  • Moving a String or List out of a for loop variable is a compile error (use x.clone()); it silently produced a double free before. A loop variable is a view of the element.

Fixed

  • unreachable as the last statement of a function returning an error union or struct produced C that did not compile.
  • A program whose imported module also defines main (as self/lexer.nx does, for running the lexer on its own) took the wrong entry point.
  • nx left one Zig cache directory behind per process under nx-out/.zig-cache; it is removed when the command finishes, and stale ones are swept.

Install

Windows: run nexium-0.6.0-setup-x64.exe. It installs nx, a bundled Zig toolchain (the C compiler nx uses), the standard library, examples, docs, and the VS Code extension, and can add nx to your PATH. No other install is needed. A portable zip without the installer is nx-v0.6.0-x86_64-pc-windows-msvc.zip.

macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/Londopy/nexium/main/installers/install.sh | sh

This downloads nx-v0.6.0-aarch64-apple-darwin.tar.gz or nx-v0.6.0-x86_64-unknown-linux-gnu.tar.gz, verifies it against SHA256SUMS.txt, installs to ~/.nexium/bin, downloads Zig on Linux when no C compiler is present (macOS uses the Xcode command line tools), and adds the directory to your PATH. Set NEXIUM_VERSION=v0.6.0 to pin this release.

From source (Rust 1.75+): cargo install nexium

VS Code: install nexium-v0.6.0.vsix with Extensions: Install from VSIX..., or let the Windows installer do it.

Then, in a new console:

nx doctor
nx run examples/hello.nx

Files

file size SHA-256
nexium-0.6.0-setup-x64.exe 49.6 MB 0d46f260c94028e835dbc7e30ab18f8f1e5397061b5d46684fa7178a53b976fa
nexium-v0.6.0.vsix 9.8 KB 404dc7624ad1968965106ba2634555b31981d4932b803b01da817b4a81c0fed3
nx-v0.6.0-aarch64-apple-darwin.tar.gz 1.5 MB 122745d6730bcf310662266781526810da9d88978132aa0b5dfd9cb1ab1ffb5a
nx-v0.6.0-x86_64-pc-windows-msvc.zip 1.6 MB 052f829fef7e30eaeb47fcb66f4a7fab22534d2d962b27db0a55ff55553d4670
nx-v0.6.0-x86_64-unknown-linux-gnu.tar.gz 1.6 MB f329fded81f7a0a7b041991a6bc6a18d07b2fce8fd7ec9b4c1678131410e6f6d

SHA256SUMS.txt holds the same values. Verify a download with:

sha256sum -c SHA256SUMS.txt --ignore-missing      # Linux
shasum -a 256 -c SHA256SUMS.txt --ignore-missing   # macOS
Get-FileHash .\nexium-0.6.0-setup-x64.exe -Algorithm SHA256   # Windows, compare with the table

Requirements

  • Windows 10 or later, x64. macOS on Apple Silicon. Linux x86_64 with glibc.
  • A C compiler is needed to build programs: the Windows installer and the macOS/Linux script take care of it. Otherwise put Zig on your PATH, or set NX_CC.

Nexium v0.5.0 — Annapurna: Camp III

Choose a tag to compare

@github-actions github-actions released this 19 Sep 19:07

Nexium v0.5.0

Added

  • Packages: a nexium.toml manifest with [dependencies] from a git tag ({ git = "...", tag = "..." }) or a directory ({ path = "..." }); import dep loads the dependency's src/lib.nx and import dep.module its src/module.nx; a package's own imports stay inside the package. nx init writes a manifest, nx add records and fetches a dependency, nx fetch clones every git dependency (transitively) into nexium_modules/ and writes nexium.lock with the resolved commits. See docs/packages.md.
  • A tree-sitter grammar (editors/tree-sitter-nexium) with highlight queries for Neovim, Helix and Zed; it parses every example, std module and self-hosted source without an error node, and CI keeps it that way.
  • The language server gained go to definition (functions, types, constants, locals, imported and package modules), completion (module members after alias., fields, methods, variants and errors after ., names in scope), and rename (a local within its function, an item across the file). They work from the parsed source, so they answer in files that do not type-check yet.
  • artifact installer: nx ship produces an installer for a program. On Windows an Inno Setup script (compiled to <Name>-<version>-setup-x64.exe when Inno Setup 6 is installed) with license page, per-user or all-users install, Start menu entry, optional PATH entry and uninstaller; on Linux and macOS an install.sh with --prefix and --uninstall plus a tarball. Listed files are copied next to the program.
  • artifact node { name = "pkg" }: nx ship produces an npm package for an exported library: index.js calling the shared library through koffi (no build step, no node-gyp), index.d.ts typings, package.json. Slices take typed arrays, arrays or strings; error unions throw NexiumError and panics throw NexiumPanic with the message.

Fixed

  • Parallel builds on Windows could fail inside Zig's own cache ("failed to check cache ... file_open Unexpected") when several zig cc processes started at once; each nx process now gives Zig its own cache under the output directory unless ZIG_LOCAL_CACHE_DIR is set.

Install

Windows: run nexium-0.5.0-setup-x64.exe. It installs nx, a bundled Zig toolchain (the C compiler nx uses), the standard library, examples, docs, and the VS Code extension, and can add nx to your PATH. No other install is needed. A portable zip without the installer is nx-v0.5.0-x86_64-pc-windows-msvc.zip.

macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/Londopy/nexium/main/installers/install.sh | sh

This downloads nx-v0.5.0-aarch64-apple-darwin.tar.gz or nx-v0.5.0-x86_64-unknown-linux-gnu.tar.gz, verifies it against SHA256SUMS.txt, installs to ~/.nexium/bin, downloads Zig on Linux when no C compiler is present (macOS uses the Xcode command line tools), and adds the directory to your PATH. Set NEXIUM_VERSION=v0.5.0 to pin this release.

From source (Rust 1.75+): cargo install nexium

VS Code: install nexium-v0.5.0.vsix with Extensions: Install from VSIX..., or let the Windows installer do it.

Then, in a new console:

nx doctor
nx run examples/hello.nx

Files

file size SHA-256
nexium-0.5.0-setup-x64.exe 49.5 MB a80112ba40ffaa1f16308735283cdc9203e235b53aa2ba9d540cc441109364ac
nexium-v0.5.0.vsix 9.8 KB 2bb06f18720560260e737df62dd10d8976f9d701fbeae7df606cd600684ea1a8
nx-v0.5.0-aarch64-apple-darwin.tar.gz 1.4 MB 2f8f927fafdb8c5e0f373c0c2544fcf88a021013b5ec5ee2fc962b0859e03eb6
nx-v0.5.0-x86_64-pc-windows-msvc.zip 1.6 MB fbe59b1db65a70f527a5b6fb8e2f77091eaf5bd6cf9c9f84a7e59494722f3a6a
nx-v0.5.0-x86_64-unknown-linux-gnu.tar.gz 1.6 MB 2e8058313854db89ffc78b211b22cff6ac9076517831fd8d70143f132a2086b0

SHA256SUMS.txt holds the same values. Verify a download with:

sha256sum -c SHA256SUMS.txt --ignore-missing      # Linux
shasum -a 256 -c SHA256SUMS.txt --ignore-missing   # macOS
Get-FileHash .\nexium-0.5.0-setup-x64.exe -Algorithm SHA256   # Windows, compare with the table

Requirements

  • Windows 10 or later, x64. macOS on Apple Silicon. Linux x86_64 with glibc.
  • A C compiler is needed to build programs: the Windows installer and the macOS/Linux script take care of it. Otherwise put Zig on your PATH, or set NX_CC.

Nexium v0.4.0 — Annapurna: Camp II

Choose a tag to compare

@github-actions github-actions released this 19 Sep 05:54

Nexium v0.4.0

Added

  • Sockets in the runtime: net.connect, listen, accept, send, recv, close, peer, local, resolve, udp_bind, send_to, recv_from, last_peer; blocking, with per-call timeouts, on Winsock and BSD sockets. New errors Timeout and ConnectionRefused.
  • std.net: TcpStream (connect with timeout, send, recv, recv_all, peer, buffered reader()/writer()), TcpListener (bind, accept with timeout, port), UdpSocket (bind, send_to, recv_from), parse_addr, port_of, resolve. std.stream readers and writers work over sockets.
  • std.http: a client (get, post, request with headers; HTTP/1.1, Content-Length and chunked bodies, up to five redirects) and a server (Server.bind, serve, serve_one, Router with exact and /* routes, serve_static, Request.param/header, response helpers text, html, json, redirect, not_found). Plain http://; TLS is left to @cImport.
  • examples/service.nx: an HTTP service and a client in one program, the phase 2 exit example; examples/errors_more.nx covers the fixes below.
  • Threads in the runtime (thread.start, thread.join, thread.count, sync.mutex_new/lock/unlock/mutex_free, sync.cond_new/wait/ signal/broadcast/cond_free) and std.thread on top: spawn returns a Thread(T, R) whose join yields the function's result, run returns a Worker(T) for functions without one, Channel(T) (send, recv, try_recv, close), Mutex(T) (lock returns *mut T, unlock). A panic inside a thread is re-raised by join. Starting a thread carries the nondeterministic and shared_mutable effects.
  • own is accepted on parameters of methods in generic impl blocks.
  • process.exec(argv, stdin, cwd) runs a program with stdin fed, a working directory, and stdout/stderr captured (process.last_stdout, process.last_stderr); std.process wraps it as run, run_with, shell returning an Output with code, stdout, stderr.

Fixed

  • Free functions with the same name in two imported modules (fs.copy and stream.copy) collided in the generated C.
  • Returning a caught error value (catch |e| { return e }) from a function returning !T produced a bare error id instead of an error union.
  • An untyped integer literal now coerces into !T (return 7 in a function returning !i32).
  • The formatter kept the space in -> http.Response { (a dotted type before a block is not a struct literal).

Install

Windows: run nexium-0.4.0-setup-x64.exe. It installs nx, a bundled Zig toolchain (the C compiler nx uses), the standard library, examples, docs, and the VS Code extension, and can add nx to your PATH. No other install is needed. A portable zip without the installer is nx-v0.4.0-x86_64-pc-windows-msvc.zip.

macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/Londopy/nexium/main/installers/install.sh | sh

This downloads nx-v0.4.0-aarch64-apple-darwin.tar.gz or nx-v0.4.0-x86_64-unknown-linux-gnu.tar.gz, verifies it against SHA256SUMS.txt, installs to ~/.nexium/bin, downloads Zig on Linux when no C compiler is present (macOS uses the Xcode command line tools), and adds the directory to your PATH. Set NEXIUM_VERSION=v0.4.0 to pin this release.

From source (Rust 1.75+): cargo install nexium

VS Code: install nexium-v0.4.0.vsix with Extensions: Install from VSIX..., or let the Windows installer do it.

Then, in a new console:

nx doctor
nx run examples/hello.nx

Files

file size SHA-256
nexium-0.4.0-setup-x64.exe 49.5 MB 23fd48ebc246c33a41805648080ac94e1f76c0f2dfd2234c80cb13e3cc20db97
nexium-v0.4.0.vsix 9.7 KB c8579b14ac9ecefcf75021b1ab3d4cfd43d2e4fa8ee384729f192efc7ae6b3e4
nx-v0.4.0-aarch64-apple-darwin.tar.gz 1.3 MB 92b9a1c7598f3be34ca3bdf4080e339db96e7085429d54f302abc90cad8f1701
nx-v0.4.0-x86_64-pc-windows-msvc.zip 1.5 MB 0da9e30ceb12f4b87e3e15706d037bedc0743dbb02f5f3b78cb4521db5b31c0a
nx-v0.4.0-x86_64-unknown-linux-gnu.tar.gz 1.5 MB a7859f6599fb724a980baa42256034253ee297cd5f53cddb40f5b890a1690a29

SHA256SUMS.txt holds the same values. Verify a download with:

sha256sum -c SHA256SUMS.txt --ignore-missing      # Linux
shasum -a 256 -c SHA256SUMS.txt --ignore-missing   # macOS
Get-FileHash .\nexium-0.4.0-setup-x64.exe -Algorithm SHA256   # Windows, compare with the table

Requirements

  • Windows 10 or later, x64. macOS on Apple Silicon. Linux x86_64 with glibc.
  • A C compiler is needed to build programs: the Windows installer and the macOS/Linux script take care of it. Otherwise put Zig on your PATH, or set NX_CC.