Installing Nyx
Nyx is under active development. The bootstrap compiler is built from source. Once stable releases are available, you'll use a simple installer.
Prerequisites
| Tool | Purpose | Install |
|---|---|---|
| Rust | Bootstrap compiler | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh |
| LLVM 18+ | Code generation (future) | apt install llvm-18-dev or from llvm.org |
| CMake + Ninja | Build system | apt install cmake ninja-build |
| Git | Version control | apt install git |
| GCC or Clang | C compilation (bootstrap) | apt install build-essential |
Build the Bootstrap Compiler
git clone https://github.com/9jaoncloud/nyx-programming-language-bootstrap
cd nyx-bootstrap
cargo build --release
Add to your PATH:
export PATH="$PWD/target/release:$PATH"
nyc --version
Build from Source (Full Toolchain)
git clone https://github.com/9jaoncloud/nyx-programming-language
cd nyx
chmod +x scripts/bootstrap.sh
./scripts/bootstrap.sh
This script:
- Builds the Rust bootstrap compiler (
nyc) - Uses
nycto compile the Nyx self-hosted compiler - Compiles the standard library
- Builds the package manager (
nyx)
Verify Installation
nyx --version
# Nyx Package Manager v0.1.0
nyx init hello-world
cd hello-world
nyx run
# Hello from Nyx!
Platform-Specific Notes
Linux
Install dev packages: apt install build-essential llvm-18-dev cmake ninja-build pkg-config libssl-dev
macOS
Install via Homebrew: brew install llvm@18 cmake ninja
Windows
Use WSL2 (recommended) or MSYS2 with MinGW. Install LLVM from llvm.org and add to PATH.
Note: The WebAssembly target requires LLVM built with the WASM backend. For mobile targets you'll need Xcode (iOS) and Android NDK (Android).