Skip to main content

Installation Guide

Comprehensive setup guide for AdeshLang across all supported platforms.

🚀 Quick Setup & Installation Flow

Get started in 3 simple steps:

  1. Download & Install Core Package: Choose your platform below or see the complete Installation Downloads & Checksums.
  2. Verify Environment: Run adesh doctor to inspect compiler backends, PATH, and JIT runtime.
  3. Setup Optional LLVM Toolchain: Run adesh toolchain install --use-system-packages if you require AOT binary compilation (adesh build).
Instant Out-of-the-Box Execution

You can run programs (adesh run file.adesh), enter the REPL (adesh repl), and use the lightning-fast Cranelift JIT (adesh run --njit file.adesh) immediately after installing the core package without needing external LLVM toolchains!

Pre-built Packages (v0.3.0)


Toolchain Management (adesh toolchain)

For AOT compilation and advanced MLIR/GPU workflows:

# Recommended on Linux / macOS (uses system package manager)
adesh toolchain install --use-system-packages

# Download pinned LLVM/MLIR toolchain directly
adesh toolchain install

# Inspect active compiler and linker paths
adesh toolchain current

# List available toolchains
adesh toolchain list

Building from Source (Advanced / Contributors)

System Requirements

Minimum Requirements

  • OS: Windows 10+, macOS 10.15+, Linux (any modern distro)
  • RAM: 4GB minimum (8GB recommended)
  • Disk Space: 2GB for toolchain + build artifacts
  • Internet: Required for initial setup

Required Tools

ToolVersionPurposeRequired For
Rust1.70+Compiler and toolchainAll development
Cargo(included)Package managerBuilding from source
C CompilerAnyNative compilationAOT, Native JIT

Platform-Specific Installation

Windows

  1. Install MSYS2

    # Download from https://www.msys2.org/
    # Run installer and follow prompts
  2. Install required packages

    pacman -S mingw-w64-x86_64-mlir
    pacman -S mingw-w64-x86_64-gcc
  3. Set environment variables

    [Environment]::SetEnvironmentVariable("ADESH_MLIR_OPT", "C:\msys64\mingw64\bin\mlir-opt.exe", "User")
    [Environment]::SetEnvironmentVariable("ADESH_MLIR_TRANSLATE", "C:\msys64\mingw64\bin\mlir-translate.exe", "User")
    [Environment]::SetEnvironmentVariable("ADESH_LLC", "C:\msys64\mingw64\bin\llc.exe", "User")

Option 2: Chocolatey (Simpler setup)

# Install Rust
choco install rust-ms

# Install MinGW
choco install mingw

# Verify installations
rustc --version
gcc --version

Option 3: Manual Setup

  1. Install Rust from rustup.rs
  2. Install Visual Studio Build Tools with C++ workload
  3. Download LLVM from https://releases.llvm.org/

macOS

# Install Xcode Command Line Tools
xcode-select --install

# Install Homebrew if not installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install Rust
brew install rust

# Install LLVM (for AOT and GPU backend)
brew install llvm

# Add LLVM to PATH
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc

Using MacPorts

sudo port install rust llvm clang

Linux

Ubuntu/Debian

# Update package list
sudo apt update

# Install Rust via rustup (recommended)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

# Install build tools
sudo apt install build-essential

# Install LLVM and MLIR tools
sudo apt install llvm-dev mlir-tools clang

# Verify installations
rustc --version
llvm-config --version

Arch Linux

# Install Rust
sudo pacman -S rust

# Install build tools
sudo pacman -S base-devel

# Install LLVM and MLIR
sudo pacman -S llvm mlir clang

Fedora

# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

# Install build tools
sudo dnf install gcc gcc-c++ make

# Install LLVM and MLIR
sudo dnf install llvm-devel mlir-tools clang

Building AdeshLang from Source

Step 1: Clone the Repository

git clone https://github.com/adeshlang/adeshlang.git
cd adeshlang

Step 2: Build in Release Mode

# Standard release build
cargo build --release

# Build with all optimizations
cargo build --release --target=x86_64-unknown-linux-gnu

Build time: 5-10 minutes on most systems.

Step 3: Verify the Build

# Check that the binary was created
ls -lh target/release/adesh

# Test the binary
./target/release/adesh --version

Linux/macOS

# Create a directory for user binaries
mkdir -p $HOME/.local/bin

# Copy the adesh binary
cp target/release/adesh $HOME/.local/bin/

# Add to PATH (add to ~/.bashrc or ~/.zshrc)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Windows (PowerShell)

# Get the release directory path
$adeshPath = "D:\Projects\AdeshLang\target\release"

# Add to user PATH
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
[Environment]::SetEnvironmentVariable("Path", "$userPath;$adeshPath", "User")

# Refresh current session
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","User")

Optional Components

GPU/MLIR Backend Setup

For GPU acceleration, you need additional tools:

CUDA Toolkit (NVIDIA GPUs)

  1. Download from NVIDIA CUDA Downloads
  2. Follow platform-specific installation instructions
  3. Verify: nvcc --version

ROCm (AMD GPUs)

  1. Download from AMD ROCm
  2. Follow installation guide for your Linux distribution
  3. Verify: rocminfo

Vulkan SDK

  1. Download from Vulkan SDK
  2. Install and follow setup instructions
  3. Verify: vulkaninfo

WebAssembly Target

To compile to WebAssembly:

# Add WASM target
rustup target add wasm32-unknown-unknown

# Install wasm-pack (optional)
cargo install wasm-pack

Verification

After installation, verify everything works:

# 1. Check AdeshLang version
adesh --version

# 2. Run a simple test from the real examples tree
adesh run examples/01_Basics/variable.adesh

# 3. Test different backends
adesh run examples/01_Basics/variable.adesh --jit
adesh run examples/01_Basics/variable.adesh --njit

# 4. Check GPU toolchain (if installed)
adesh gpu-check

Troubleshooting

Common Issues

"Command not found: adesh"

# Check if adesh is in PATH
which adesh # Linux/macOS
where adesh # Windows

# Use full path as workaround
/path/to/target/release/adesh run hello.adesh

Build fails with linker errors

Windows: Install Visual Studio Build Tools with C++ workload

Linux: Install build-essential or equivalent

macOS: Install Xcode Command Line Tools

Rust version too old

rustup update

LLVM tools not found

Ensure LLVM is installed and in PATH:

# Check LLVM installation
llvm-config --version

# Add to PATH if needed
export PATH="/path/to/llvm/bin:$PATH"

Getting Help

  • Check FAQ section
  • Browse existing GitHub Issues
  • Create a new issue with detailed error messages

Next Steps

After successful installation:

  1. Quick Start - Your first AdeshLang program
  2. First Program - Build a complete application
  3. Language Basics - Learn the syntax

Happy coding! 🚀

Download the installer or package for your operating system from the AdeshLang v0.3.0 Release or check the detailed Installation Page:

After installation, verify the distribution:

adesh doctor
adesh env --json

AdeshLang bundles and manages its own compatible LLVM/Clang/LLD toolchain in toolchain/llvm. Existing LLVM, Clang, GCC, MSYS2, and Visual Studio installations are not overwritten or added to the global PATH. Only the AdeshLang bin directory is added by an installer; portable archives do not modify PATH.

The installed tools are adesh (language CLI), adl (package manager), als (language server), and adesh-editor (cross-platform TUI code editor). Use adesh toolchain current to inspect the active toolchain, or adesh toolchain --system/--system-toolchain for an explicit advanced system-toolchain selection. You can also launch the TUI editor using either adesh editor or directly via the adesh-editor CLI command.

Environment and troubleshooting

ADESH_HOME, ADESH_TOOLCHAIN, and ADESH_LLVM are optional overrides. The installation location is derived from the executable when they are unset. adesh env --shell prints shell-specific exports for PowerShell, CMD, Bash, Zsh, and Fish. Use adesh repair after moving files or an interrupted upgrade.