Issue #541: Installing before 0.1: cargo install from the repository, a missing sysroot said in Nikaia’s words, the first std build announced (ADR-336 D1)

Open and answer this issue on GitHub.

tools, ready · opened 2026-10-07 · updated 2026-10-08 · 1 comment

Records: Part III 13 (a stable Rust toolchain and nothing else), 13.2b (the sysroot, NIKAIA_SYSROOT, std lowered at release time), ADR-002 D4.

Where it stands. The only way to get the compiler is cargo build --release -p nikaia in a clone, and then “leave the checkout where it is”, because the sysroot defaults to the source tree the binary was built from. There are no GitHub releases. A tester has to build a compiler before running a first program, and can’t move or delete the checkout afterwards.

The design already allows something better: std “ships as sources, with its Nikaia half already lowered”, and building it needs only rustc. A release is that sysroot plus one binary.

Proposal

  1. A versioned archive per built target (x86_64-linux, aarch64-linux): bin/nikaia and lib/nikaia/ (the sysroot: std’s sources with the lowered .rs, std.contracts inside the binary as now). The binary finds the sysroot relative to itself (../lib/nikaia) before falling back to the build tree, so an unpacked archive works anywhere with no environment variable.
  2. Built by a workflow on a version tag, with the archive’s SHA-256 published beside it, and the build reproducible from the tag.
  3. One install line in Getting started (download, unpack, add to PATH); building from source moves to the second section.
  4. Later, once the archive is settled: .deb / .rpm and the VS Code extension under editors/vscode attached to the same release.

Not changed. A Rust toolchain stays a prerequisite: the archive ships the compiler, not rustc. The first build still compiles std once per machine into the user’s cache (about 15 s). The guide should say so up front, or a first build that is silent for 15 s reads as a hang, so whether nikaia prints a one-line compiling std, once per machine notice is part of this.

To decide. How the binary finds its sysroot (relative path, then NIKAIA_SYSROOT, then the build tree, or NIKAIA_SYSROOT first), and whether the version in the archive name is the specification’s (0.0.644) or a separate release number.

Comments

keywan-ghadami, 2026-10-08

Decided (owner, 2026-10-08)

There are no GitHub releases before 0.2, and no crates.io before 0.1. Until then the compiler is installed with cargo install from the repository. GitHub releases from 0.2 hold the optimised binary and also a container image, with nikaia, for a quick start. A .deb comes with 1.0.

What was checked

To build

  1. guide/getting-started.md: the first way to get the compiler is cargo install --git https://github.com/Nikaia-Language/Nikaia --locked nikaia. The guide says that it builds the compiler (a few minutes) and that --tag/--rev pins a version. Building from a clone becomes the second section, and leave the checkout where it is goes with it. The guide also says up front that the first program compiles std once per machine.
  2. A missing sysroot is reported in Nikaia’s words (Part III C.1): the directory looked for, that it holds std, and how to get it back (run the cargo install line again, or set NIKAIA_SYSROOT). Test: NIKAIA_SYSROOT pointing at a missing directory gives that message and no Cargo error.
  3. The first build says why it is slow: when the cache has no compiled std for this key, nikaia prints one line, compiling std, once per machine, before Cargo starts. Test: the line appears on a build into an empty NIKAIA_CACHE_DIR, and not on the second build.

Steps 2 and 3 change the compiler, so they raise the version. Step 1 does not.


Generated by Claude Code

Back to Open Issues