Try Online

Onyx is available to try online for free in the Onyx Playground. It allows you learn the syntax from examples, without installing the language onto your system.

Go to Playground

Linux / MacOS

The easiest way to install Onyx on a Linux or MacOS system is to use the installation script you can find at get.onyxlang.io. You can download and run the script in one bash command. You will be asked to pick a WebAssembly runtime for your installation. See the compatibility and feature chart to help you decide.

sh <(curl https://get.onyxlang.io -sSfL)

Windows

  1. Download the latest Windows release from the Releases on GitHub.
  2. Extract the zip file to a permanent location.
  3. Modify system environment variables.
    • Make a new variable called ONYX_PATH, and set it equal to the extracted folder path.

    • Add the extracted folder to your user's PATH variable.

  4. Log out and log back in to let system environment variables update.
  5. Open a Command Prompt or Powershell instance, and try running onyx.

From Source

Building Onyx from source is easy. If you want to use the Wasmer runtime, you will need to have Wasmer installed. See their installation instructions for details.

To build on Linux or MacOS, run the following commands.

# Download Onyx.
git clone https://github.com/onyx-lang/onyx --depth 1
cd onyx
# Load settings used for compilation. Change these settings if you would like.
source settings.sh
# Compile and install Onyx.
./build.sh compile install

To build on Windows, run the following commands.

REM Ensure cl.exe is able to run in the current prompt.
REM Download Onyx.
git clone https://github.com/onyx-lang/onyx --depth 1
cd onyx
REM Run the build script. The Onyx executable will be in the current directory.
build.bat
© 2020-2024 Brendan Hansen