Skip to main content

Installation

EmmyLua Analyzer provides multiple installation methods to suit different workflows and environments. Choose the method that works best for you.

System Requirements

Operating System

  • Windows 10+
  • macOS 10.15+
  • Linux (any modern distro)

For Cargo Installation

  • Rust 1.70 or later
  • Cargo package manager

Disk Space

  • ~50MB for binaries
  • ~200MB for source build

Installation Methods

The easiest way to install EmmyLua Analyzer is through Cargo, Rust’s package manager.
1

Install Rust and Cargo

If you don’t have Rust installed, install it using rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Follow the on-screen instructions and restart your terminal.
2

Install EmmyLua Components

Install the components you need:
cargo install emmylua_ls
Installation may take 5-10 minutes as Cargo compiles the binaries from source.
3

Verify Installation

Verify each component is installed correctly:
emmylua_ls --version
emmylua_check --version
emmylua_doc_cli --version
You should see version information for each command.

Method 2: Pre-Built Binaries

For faster installation without compiling, download pre-built binaries from GitHub releases.
1

Download Binaries

Visit the GitHub Releases page and download the appropriate archive for your platform:
  • Windows: emmylua-analyzer-windows-x64.zip
  • macOS: emmylua-analyzer-macos-x64.tar.gz (Intel) or emmylua-analyzer-macos-arm64.tar.gz (Apple Silicon)
  • Linux: emmylua-analyzer-linux-x64.tar.gz
2

Extract the Archive

Extract the downloaded archive to a location of your choice:
tar -xzf emmylua-analyzer-*.tar.gz
cd emmylua-analyzer
3

Add to PATH

Add the extracted directory to your system PATH:
Add to your shell profile (~/.bashrc, ~/.zshrc, or ~/.profile):
export PATH="$HOME/path/to/emmylua-analyzer:$PATH"
Then reload your shell:
source ~/.bashrc  # or ~/.zshrc
4

Verify Installation

Open a new terminal and verify:
emmylua_ls --version

Method 3: Build from Source

For the latest development version or custom builds, compile from source.
1

Install Prerequisites

Ensure you have Rust and Git installed:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
2

Clone the Repository

Clone the EmmyLua Analyzer repository:
git clone https://github.com/EmmyLuaLs/emmylua-analyzer-rust.git
cd emmylua-analyzer-rust
3

Build the Binaries

Build all components or specific ones:
cargo build --release
Building from source can take 10-15 minutes depending on your system.
The compiled binaries will be located in target/release/.
4

Install the Binaries

Copy the binaries to a directory in your PATH:
sudo cp target/release/emmylua_ls /usr/local/bin/
sudo cp target/release/emmylua_check /usr/local/bin/
sudo cp target/release/emmylua_doc_cli /usr/local/bin/
5

Verify Installation

emmylua_ls --version
emmylua_check --version
emmylua_doc_cli --version

Component-Specific Installation

Installing Only the Language Server

If you only need editor integration:
cargo install emmylua_ls
Then proceed to Editor Setup to configure your editor.

Installing Only the Static Analyzer

For CI/CD pipelines or command-line checking:
cargo install emmylua_check
See the Static Analyzer guide for usage instructions.

Installing Only the Documentation Generator

For documentation generation:
cargo install emmylua_doc_cli
See the Documentation Generator guide for usage instructions.

Verification

After installation, verify that all components are working correctly:
Test the language server:
emmylua_ls --help
Expected output:
Usage: emmylua_ls [OPTIONS]

Options:
  -c, --communication <COMMUNICATION>  [possible values: stdio, tcp]
      --port <PORT>                    [default: 5007]
      --log-level <LOG_LEVEL>          [possible values: debug, info, warn, error]
      --log-path <LOG_PATH>
  -h, --help                           Print help
  -V, --version                        Print version

Updating

To update EmmyLua Analyzer to the latest version:
# Update all components
cargo install emmylua_ls --force
cargo install emmylua_check --force
cargo install emmylua_doc_cli --force

Troubleshooting

This usually means the installation directory is not in your PATH.For Cargo installations, ensure ~/.cargo/bin is in your PATH:
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
For Windows, you may need to restart your terminal or computer.
Make sure you have the latest Rust version:
rustup update stable
If the error persists, try installing with verbose output:
cargo install emmylua_ls --verbose
If you get permission errors, either:
  1. Use sudo for system-wide installation:
    sudo cargo install emmylua_ls
    
  2. Or install to user directory (no sudo needed):
    cargo install emmylua_ls --root ~/.local
    
    Then add ~/.local/bin to your PATH.
Cargo compilation can be slow on first install. To speed it up:
  • Use pre-built binaries instead
  • Enable parallel compilation:
    export CARGO_BUILD_JOBS=4
    cargo install emmylua_ls
    
  • Use faster linker (Linux only):
    sudo apt install mold
    cargo install emmylua_ls
    

Next Steps

Quick Start

Get up and running in 5 minutes

Editor Setup

Configure your editor to use EmmyLua Analyzer

Build docs developers (and LLMs) love