Prerequisites
Before building EmmyLua Analyzer, ensure you have the Rust toolchain installed on your system.Installing Rust
If you don’t have Rust installed, use rustup to install the latest stable version:Building the Project
Build all crates
Build all workspace crates in release mode for optimal performance:This will compile all crates in the workspace and place the binaries in
target/release/.Building Specific Components
You can build individual components instead of the entire workspace:Language Server
Build just the language server executable:target/release/emmylua_ls.
Documentation Generator
Build the documentation CLI tool:Static Analyzer
Build the static analysis tool:Parser Library
Build just the parser library:Development Build
For faster compilation during development, you can omit the--release flag:
Running Tests
Development Setup
Code Formatting
EmmyLua Analyzer usesrustfmt for code formatting. Format all code before committing:
Pre-commit Hooks
The project usespre-commit to ensure code quality:
Linting
The project uses Clippy for linting. Run the linter:Troubleshooting
Build Failures
If you encounter build errors:-
Update Rust toolchain: Ensure you’re using a recent stable version
-
Clean build artifacts: Remove cached builds and start fresh
- Check dependencies: Verify all system dependencies are installed
Test Failures
If tests fail:-
Run with verbose output:
-
Run a specific test:
Next Steps
Contributing Guide
Learn how to contribute to the project
Architecture Overview
Understand the codebase structure
