Installation Guide
Comprehensive setup guide for AdeshLang across all supported platforms.
🚀 Quick Setup & Installation Flow
Get started in 3 simple steps:
- Download & Install Core Package: Choose your platform below or see the complete Installation Downloads & Checksums.
- Verify Environment: Run
adesh doctorto inspect compiler backends, PATH, and JIT runtime. - Setup Optional LLVM Toolchain: Run
adesh toolchain install --use-system-packagesif you require AOT binary compilation (adesh build).
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)
- 🪟 Windows: Windows Setup (.exe) | Portable ZIP
- 🍏 macOS: Apple Silicon PKG | Intel PKG
- 🐧 Linux: Debian/Ubuntu DEB | Fedora RPM | Tarball (.tar.xz)
- 📱 Android: Android APK (ARM64)
- 💻 VS Code: Extension (.vsix)
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
| Tool | Version | Purpose | Required For |
|---|---|---|---|
| Rust | 1.70+ | Compiler and toolchain | All development |
| Cargo | (included) | Package manager | Building from source |
| C Compiler | Any | Native compilation | AOT, Native JIT |
Platform-Specific Installation
Windows
Option 1: MSYS2 (Recommended for GPU/MLIR)
-
Install MSYS2
# Download from https://www.msys2.org/# Run installer and follow prompts -
Install required packages
pacman -S mingw-w64-x86_64-mlirpacman -S mingw-w64-x86_64-gcc -
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
- Install Rust from rustup.rs
- Install Visual Studio Build Tools with C++ workload
- Download LLVM from https://releases.llvm.org/
macOS
Using Homebrew (Recommended)
# 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
Step 4: Add to PATH (Optional but Recommended)
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)
- Download from NVIDIA CUDA Downloads
- Follow platform-specific installation instructions
- Verify:
nvcc --version
ROCm (AMD GPUs)
- Download from AMD ROCm
- Follow installation guide for your Linux distribution
- Verify:
rocminfo
Vulkan SDK
- Download from Vulkan SDK
- Install and follow setup instructions
- 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:
- Quick Start - Your first AdeshLang program
- First Program - Build a complete application
- Language Basics - Learn the syntax
Happy coding! 🚀
Recommended installation
Download the installer or package for your operating system from the AdeshLang v0.3.0 Release or check the detailed Installation Page:
- 🪟 Windows (x86_64): Download Windows Setup (.exe) | Portable ZIP
- 🍏 macOS (Apple Silicon): Download macOS PKG Installer | DMG Image
- 🍏 macOS (Intel x86_64): Download macOS PKG Installer | DMG Image
- 🐧 Linux (Debian/Ubuntu): Download DEB (amd64) | Download DEB (arm64)
- 🐧 Linux (Fedora/RHEL): Download RPM (x86_64) | Download RPM (aarch64)
- 🐧 Linux (Universal Tarball): Download .tar.xz (x86_64) | Download .tar.xz (arm64)
- 📱 Android: Download Android APK (ARM64) | Universal APK
- 💻 VS Code Extension: Download VS Code Extension (.vsix)
- 📦 All Downloads & Checksums: Full Installation Guide & SHA-256 Table | GitHub Releases
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.