haxe Getting started with haxe Installation


Example

Haxe is available on Windows, Linux, and OS X. It is distributed in two forms:

  • as an installer, providing an optional Neko VM dependency and configuring haxe and haxelib environment variables;
  • as binaries, providing only the Haxe compiler and package manager.

Windows

Installer and binaries are available from the Haxe website.

Linux

Binaries (32-bit and 64-bit) are available from the Haxe website.

The Haxe Foundation also officially participates in the maintenance of Haxe and Neko packages for popular Linux distributions. It is recommended to use those packages if available.

Ubuntu

It is recommended to use the Haxe PPA which provides latest Haxe and Neko releases for all currently supported Ubuntu versions. The PPA can also be used for Ubuntu-based distributions.

sudo add-apt-repository ppa:haxe/releases -y
sudo apt-get update
sudo apt-get install haxe -y
mkdir ~/haxelib && haxelib setup ~/haxelib

Note that Neko is installed as a dependency of Haxe.

Debian

To install the currently available stable versions, run the following commands:

sudo apt-get install haxe -y
mkdir ~/haxelib && haxelib setup ~/haxelib

Note that Neko will be installed as a dependency of Haxe.

To install newer releases from the unstable channel, do the following:

  1. In /etc/apt/sources.list, add

    deb http://httpredir.debian.org/debian unstable main contrib non-free

  2. In /etc/apt/preferences.d/, create a new file named unstable with the following content:

    Package: *
    Pin: release a=unstable
    Pin-Priority: 100
    
    Package: haxe neko libneko*
    Pin: release a=unstable
    Pin-Priority: 999
    
  3. Pull package index files from the newly added source:

    sudo apt-get update

  4. Install Haxe (and Neko):

    sudo apt-get install haxe -y

Fedora

The Haxe Foundation maintains the Haxe and Neko RPM packages in the Fedora repository. The packages are up-to-date most of the time. However, when a new version of Haxe is released, it will take a few days, up to 2 weeks, to push an updated package to the stable releases of Fedora. The update activities can be tracked in the Bodhi Fedora Update System.

To install the currently available versions of Haxe and Neko, run the following commands:

sudo dnf install haxe -y
mkdir ~/haxelib && haxelib setup ~/haxelib

Note that Neko is installed as a dependency of Haxe.

openSuse

The Haxe Foundation maintains the Haxe and Neko RPM packages in the openSUSE:Factory repository. The packages are up-to-date most of the time. However, when a new version of Haxe is released, it will take a few days, up to 2 weeks, to be accepted by openSUSE:Factory.

To install currently available versions of Haxe and Neko, run the following commands:

sudo zypper install haxe
mkdir ~/haxelib && haxelib setup ~/haxelib

Note that Neko is installed as a dependency of Haxe.

To get the lastest Haxe version that may not available to openSUSE:Factory or an openSUSE release, use the devel:languages:haxe project in the openSUSE Build Service. Visit the Haxe package page, click "Download package" at the top-right corner and follow the instructions. Again, Neko will also be installed as a dependency of Haxe.

Arch Linux

There are Haxe and Neko packages in the Arch Linux community repository. The Haxe Foundation will continue to help keep the packages up-to-date. However, when a new version of Haxe is released, it will take time to update the package, depended on the availability of the package maintainer.

For currently available versions of Haxe and Neko, check the following pages:

To install the currently available versions of Haxe and Neko, run the following commands:

sudo pacman -S haxe
mkdir ~/haxelib && haxelib setup ~/haxelib

Note that Neko is installed as a dependency of Haxe.

OS X

Installer and binaries are available from the Haxe website.

It is also possible to install the current stable Haxe version through the Brew package manager.

brew install haxe

References