Install Nyra
Install the Nyra toolchain from a GitHub release tag, set up your environment, and run your first project on macOS, Linux, or Windows.
Repository:
github.com/nyra-lang/nyra
Releases (tags):
github.com/nyra-lang/nyra/releases
curl | sh installer. Private repos require manual download from the Releases page while signed in,
or building from source.
1. Requirements (all platforms)
| Tool | Why |
|---|---|
| clang | Links your .ny programs with the Nyra C runtime |
| tar | Extract release archives (macOS/Linux) |
clang install hints
| OS | Install |
|---|---|
| macOS | xcode-select --install (Command Line Tools) |
| Linux (Debian/Ubuntu) | sudo apt update && sudo apt install clang |
| Linux (Fedora) | sudo dnf install clang |
| Windows (native) | LLVM for Windows — add clang to PATH, or use WSL2 (recommended in §6) |
Cross-compilation toolchains (optional)
To build for another OS (e.g. release a Windows .exe from macOS), install a cross linker/sysroot in addition to clang:
| Goal | Typical setup |
|---|---|
| macOS → Linux | brew install messense/macos-cross-toolchains/aarch64-unknown-linux-gnu (or x86_64 variant) |
| macOS / Linux → Windows | MinGW-w64 + clang (brew install mingw-w64 on macOS) |
| → macOS from Linux/Windows | osxcross + Apple SDK (advanced) |
| → Wasm | Homebrew llvm (Apple clang lacks wasm32-wasi) |
Then: nyra build . --release --for windows. See Compilation targets.
2. Pick a release tag
- Open Releases.
- Choose a version (e.g. v0.0.1).
- Under Assets, download the file that matches your CPU and OS (see table).
| Your machine | Release asset |
|---|---|
| Mac, Apple Silicon (M1/M2/M3) | nyra-aarch64-darwin.tar.gz |
| Mac, Intel | nyra-x86_64-darwin.tar.gz |
| Linux, 64-bit Intel/AMD | nyra-x86_64-linux.tar.gz |
| Linux, 64-bit ARM (e.g. Raspberry Pi 4/5, ARM cloud) | nyra-aarch64-linux.tar.gz |
| Windows (native) | No prebuilt yet — use Windows below |
Optional: verify checksums using SHA256SUMS on the same release page.
3. Install layout
After extracting, you should have:
~/.nyra/ (recommended; or any folder you choose)
bin/nyra
share/stdlib/nyra_rt.c
version # e.g. 1.0.0
Set these environment variables (add to your shell profile so they persist):
export NYRA_HOME="$HOME/.nyra"
export PATH="$NYRA_HOME/bin:$PATH"
4. macOS
Option A — One-line installer (easiest)
Requires a public repo and curl:
curl -fsSL https://raw.githubusercontent.com/nyra-lang/nyra/main/scripts/install.sh | sh
Pin a specific tag:
curl -fsSL https://raw.githubusercontent.com/nyra-lang/nyra/main/scripts/install.sh | sh -s -- --version 1.0.0
Reload shell:
source ~/.zshrc # or ~/.bashrc
nyra --version
Option B — Manual install from a release tag
- Download
nyra-aarch64-darwin.tar.gzornyra-x86_64-darwin.tar.gzfrom Releases. - Extract:
mkdir -p ~/.nyra
tar -xzf ~/Downloads/nyra-aarch64-darwin.tar.gz -C ~/.nyra
- Add to
~/.zshrc(or~/.bash_profile):
export NYRA_HOME="$HOME/.nyra"
export PATH="$NYRA_HOME/bin:$PATH"
- If macOS blocks the binary (
killedon first run):
xattr -cr ~/.nyra/bin/nyra
- Verify:
source ~/.zshrc
nyra --version
5. Linux
Option A — One-line installer
curl -fsSL https://raw.githubusercontent.com/nyra-lang/nyra/main/scripts/install.sh | sh
# or pin version:
curl -fsSL https://raw.githubusercontent.com/nyra-lang/nyra/main/scripts/install.sh | sh -s -- --version 1.0.0
source ~/.bashrc # or ~/.zshrc
nyra --version
Option B — Manual install from a release tag
- Install clang:
sudo apt install clang(or your distro equivalent). - Download
nyra-x86_64-linux.tar.gzornyra-aarch64-linux.tar.gzfrom Releases. - Extract and configure:
mkdir -p ~/.nyra
tar -xzf ~/Downloads/nyra-x86_64-linux.tar.gz -C ~/.nyra
echo 'export NYRA_HOME="$HOME/.nyra"' >> ~/.bashrc
echo 'export PATH="$NYRA_HOME/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
nyra --version
6. Windows
Prebuilt Windows binaries ship on every release tag as nyra-x86_64-windows.zip.
Option A — PowerShell installer (recommended)
irm https://raw.githubusercontent.com/nyra-lang/nyra/main/scripts/install.ps1 | iex
# or pin version:
.\scripts\install.ps1 -Version 1.1.0
nyra --version
Requires clang (LLVM for Windows) on PATH to link .ny programs.
Option B — Manual zip from Releases
- Download
nyra-x86_64-windows.zipfrom Releases. - Extract to e.g.
%USERPROFILE%\.nyra. - Add
%USERPROFILE%\.nyra\bintoPATHand setNYRA_HOME. - Dot-source
env.ps1in the zip or open a new terminal after the installer updated user PATH.
Option C — WSL2 (Ubuntu)
- Install WSL2 and Ubuntu.
- Inside WSL, install clang:
sudo apt install clang curl tar. - Follow Linux (§5) — installer or manual tarball
nyra-x86_64-linux.tar.gz. - Create projects under your Linux home (e.g.
~/projects/myapp).
Alternative — Build from source (native Windows)
- Install Rust and clang (LLVM) on Windows.
- Clone the repo (same tag you want, e.g.
v0.0.1):
git clone https://github.com/nyra-lang/nyra.git
cd nyra
git checkout v0.0.1
cargo build --release -p nyra-cli
- Use the built CLI and point runtime at the repo
stdlib:
$env:PATH = "$PWD\target\release;$env:PATH"
$env:NYRA_HOME = "$PWD"
.\target\release\nyra.exe --version
- Run examples from the repo root:
.\target\release\nyra.exe run examples\syntax\hello.ny
Install nyrapkg (package manager)
Dependency management uses the standalone nyrapkg tool (guide · github.com/nyra-lang/pkg), installed alongside nyra under ~/.nyra/bin/:
curl -fsSL https://raw.githubusercontent.com/nyra-lang/pkg/main/scripts/install.sh | sh
nyrapkg --version
From source: nyra build --release -o nyrapkg . in the pkg repo, then nyrapkg bootstrap.
7. First project (all platforms)
Once nyra --version works (e.g. nyra 0.0.1):
mkdir myapp
cd myapp
nyrapkg init
This creates:
nyra.mod,nyra.lock,nyra.summain.nywith a Hello, world program
Run it:
nyra run main.ny
Expected output:
Hello, world!
import, run from the project root:
nyra run . — see Modules and Getting started.
Other useful commands:
nyra check
nyra build
nyra build --release
nyra fmt --write main.ny
8. Upgrade to a newer tag
- Open Releases and pick a newer tag (e.g.
v0.1.2). - macOS/Linux: re-run the install script with
--version, or download the new.tar.gzand extract over~/.nyra. - Confirm:
nyra --version.
9. Build from source (contributors)
If you work on the compiler itself:
git clone https://github.com/nyra-lang/nyra.git
cd nyra
cargo build --release -p nyra-cli
export PATH="$PWD/target/release:$PATH"
nyra run examples/syntax/hello.ny
Or:
cargo install --path cli
Local iteration: ./scripts/dev-install.sh from the repo root.
10. Uninstall
rm -rf ~/.nyra
Remove the NYRA_HOME / PATH lines from ~/.zshrc, ~/.bashrc, or ~/.bash_profile.
11. Troubleshooting
| Problem | Fix |
|---|---|
clang not found | Install clang (see §1) |
release asset not found | Tag not published yet, wrong arch asset, or private repo without login |
Runtime not found | Set export NYRA_HOME=~/.nyra and ensure share/stdlib/nyra_rt.c exists |
zsh: killed (macOS) | xattr -cr ~/.nyra/bin/nyra |
Failed to read main.ny | Run nyrapkg init first, or create main.ny |
404 on raw.githubusercontent.com | Repo is private — use Releases download or make repo public |
Quick reference
| Step | Command |
|---|---|
| Latest install (mac/Linux, public repo) | curl -fsSL https://raw.githubusercontent.com/nyra-lang/nyra/main/scripts/install.sh | sh |
| Pin version | ... | sh -s -- --version 1.0.0 |
| Package manager | curl -fsSL https://raw.githubusercontent.com/nyra-lang/pkg/main/scripts/install.sh | sh |
| New project | nyrapkg init && nyra run . |
| Releases page | github.com/nyra-lang/nyra/releases |
Canonical source: install.md in the repository.