Install Helix

A modern programming language under active development, built for control, performance, and clarity.

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:

  1. Navigate to the Helix GitHub Releases page and download the appropriate binary for your platform (e.g., universal-llvm-macosx.zip for macOS).
  2. Extract the downloaded ZIP file to a directory of your choice (e.g., ~/helix on macOS/Linux or C:\Helix on Windows).
  3. Add the bin folder in the extracted directory to your system PATH:
    • 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
  4. Verify the installation:
    Terminal window
    helix --version
    Expected output (example):
    Helix version 0.1.0-alpha (built on [date])

Troubleshooting

Common Issues

  • helix: command not found:
    • Ensure the bin directory is in your system PATH. Verify with:
      Terminal window
      echo $PATH
    • Check the binary path (e.g., ~/helix/bin/helix).
  • Permission Denied (macOS/Linux):
    • Ensure execution permissions:
      Terminal window
      chmod +x ~/helix/bin/helix

Uninstallation

  • Delete the folder where Helix is installed (e.g., ~/helix or C:\Helix).
  • Remove the Helix bin directory from your system PATH.

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:

  1. 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.
  2. 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
  3. Python:
  4. Git:
  5. LLVM:
    • Helix includes LLVM internally. Ensure no conflicting LLVM installations are in your system's PATH.
  6. 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
  7. Linux-Specific:
    • Install Perl using your package manager (e.g., sudo apt install perl on Ubuntu).

Cloning the Repository

Clone the Helix source code from GitHub:

Terminal window
git clone https://github.com/helixlang/helix-lang.git
cd 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.

Terminal window
xmake build -j5 -v
xmake run tests
xmake 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:

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!