Depending on your needs, the installation process will differ. Below are two guides: one for programmers wanting to use Helix and another for developers interested in contributing to its development.
- The Source Code of Helix
Helix
Note: As of now, the Helix compiler is still heavily under development. The current version is written in C++ and is not yet feature-complete. The goal is to rewrite the compiler in Helix itself, but this will take time. Your patience and understanding are appreciated as we work toward this goal.
Important: The current compiler has a lot of rough edges and is not yet ready for general use. If you're interested in contributing to Helix, please refer to the "For Developers" tab for instructions on building the compiler from source.
Installing Helix
Welcome to the installation guide for Helix! This guide will walk you through downloading, installing, and verifying Helix on your system.
Supported Platforms
Helix supports macOS, Linux, and Windows. For other platforms, you may need to build or cross-compile from source.
Tip: Linux is not yet fully tested. Most development is done on macOS or Windows. If you encounter issues on Linux, please open an issue on GitHub.
Downloading Helix
You can download the latest alpha release of Helix from the Helix GitHub Releases page. Choose the appropriate binary for your operating system.
Installation Steps
Helix does not yet have an automated installer. Follow these steps to set up the binary:
-
Navigate to the Helix GitHub Releases page and download the appropriate binary for your platform (e.g.,
universal-llvm-macosx.zip
for macOS). -
Extract the downloaded ZIP file to a directory of your choice (e.g.,
~/helix
on macOS/Linux orC:\Helix
on Windows). -
Add the
bin
folder in the extracted directory to your systemPATH
:- Windows: Update your PATH in System Settings or run:
Terminal window set PATH=%PATH%;C:Helixin - macOS/Linux: Add to your
~/.bashrc
,~/.zshrc
, or equivalent:Terminal window export PATH=$PATH:~/helix/bin
- Windows: Update your PATH in System Settings or run:
-
Verify the installation:
Expected output (example):
Terminal window helix --versionHelix version 0.1.0-alpha (built on [date])
Troubleshooting
Common Issues
-
helix: command not found
:-
Ensure the
bin
directory is in your systemPATH
. Verify with:Terminal window echo $PATH -
Check the binary path (e.g.,
~/helix/bin/helix
).
-
Ensure the
- Permission Denied (macOS/Linux):
-
Ensure execution permissions:
Terminal window chmod +x ~/helix/bin/helix
-
Ensure execution permissions:
Uninstallation
-
Delete the folder where Helix is installed (e.g.,
~/helix
orC:\Helix
). -
Remove the Helix
bin
directory from your systemPATH
.
Need Help?
If you encounter issues or have questions, reach out on:
Contributing to Helix Development
Important: The current codebase is primarily written in C++ and serves as a stepping stone for Helix's future. While this codebase may seem complex or messy, it's temporary. Our ultimate goal is a complete rewrite of Helix in Helix itself. However, to achieve that, we first need a functional compiler—which is actively being developed in C++.
If you're interested in contributing to Helix—whether working on the compiler, standard library, or other internal projects—this guide will help you set up a development environment.
Prerequisites
Ensure you have the following tools installed:
- C++ Compiler:
- GCC: Version 11 or higher
- Clang: Version 12 or higher
- MSVC: Version 19.29 or higher (Windows only)
- Windows Note: Only MSVC is supported and tested. GCC is not supported, and MinGW is untested.
- Xmake:
- Install Xmake following the Xmake installation guide.
- Windows (PowerShell):
Terminal window Invoke-Expression (Invoke-Webrequest 'https://xmake.io/psget.text' -UseBasicParsing).Content - macOS/Linux (bash/zsh):
Terminal window curl -fsSL https://xmake.io/shget.text | bash
- Python:
- Install from python.org.
- Git:
- Install from git-scm.com.
- LLVM:
- Helix includes LLVM internally. Ensure no conflicting LLVM installations are in your system's PATH.
- Windows-Specific (Visual Studio Build Tools):
-
Install Visual Studio Build Tools with:
- Desktop development with C++ workload
- MSVC v143 or higher
- Windows SDK
- C++ CMake tools for Windows
- C++ Clang Tools for Windows v17.0.x or higher
- C++ ATL for v143 build tools or higher
-
Install Visual Studio Build Tools with:
- Linux-Specific:
-
Install Perl using your package manager (e.g.,
sudo apt install perl
on Ubuntu).
-
Install Perl using your package manager (e.g.,
Cloning the Repository
Clone the Helix source code from GitHub:
git clone https://github.com/helixlang/helix-lang.gitcd helix-lang
Building Helix
Use Xmake to build Helix, including the LLVM backend, Clang, tests, and the compiler toolchain API. The build may take ~30 minutes on an 8-core CPU.
xmake build -j5 -vxmake run testsxmake run helix -h
-
The
-j5
flag uses 5 threads for faster compilation. -
The
-v
flag enables verbose output for debugging. -
xmake run tests
runs the test suite (non-comprehensive in alpha). -
xmake run helix -h
displays the compiler's help menu.
Note on LLVM Errors: If you encounter LLVM-related errors, check for conflicting LLVM installations in your system's PATH. Remove or adjust them and retry the build.
Getting Involved
Helix is an open-source project, and your contributions are welcome:
- Browse Open Issues: Find tasks on Helix's GitHub Issues.
- Start a Discussion: Share ideas or questions in Helix Community Discussions.
- Collaborate: Fix bugs, optimize performance, or propose features to shape Helix's future.
Next Steps
After building Helix:
- Explore the codebase to understand its structure.
- Pick an issue or propose a feature.
- Start contributing to make Helix a powerful, accessible language.
We look forward to your contributions and thank you for helping build Helix!