Ash ash
HashLink Bytecode Runtime

A faster runtime for
HashLink bytecode.

Ash runs .hl files compiled from Haxe. Its tiered JIT compiles frequently used functions in the background. You can also compile the same bytecode to a native executable or WebAssembly.

Get Started → View on GitHub
macOS, Linux, Windows·aarch64 & x86_64·ISC licensed
ash — shell
$ haxe -hl game.hl -main Main
$ ash game.hl
Hello from Haxe
$
Features

How ash runs your code

Ash handles compilation, garbage collection, and threading. It uses the bytecode and native library interfaces your HashLink project already targets.

01

Tiered JIT

Execution starts in the interpreter. Frequently called functions are compiled in the background while the program runs.

02

Existing bytecode

Point ash at the .hl file Haxe already produces. You can use your existing HashLink build configuration.

03

Optimization passes

Null-check elimination, GVN/CSE, LICM, FMA fusion, DCE, tail-recursion elimination, inlining, and scalar replacement of aggregates.

04

Garbage collection

The collector allocates memory as the heap grows and releases unused memory back to the system.

05

Haxe threads

Use sys.thread for threads, locks, and queues. Browser builds support parallel threads through Web Workers and shared memory.

06

WebAssembly

Build the same program to WebAssembly and run it with ash run or serve the generated browser page with ash serve.

07

Native libraries

Ash loads .hdll libraries through HashLink's native interface. Use libraries built for your platform and architecture.

08

Built-in standard library

Programs that use only the standard library run with the Ash binary alone. HDLLs also need the shared runtime included in the release.

Quick Setup

Install, compile, run

The installer downloads a prebuilt release for your platform. You'll also need Haxe to compile source code to bytecode.

01

Install Ash

Installs ash in ~/.ash/bin and adds that directory to your PATH. Ash requires a 64-bit system.

$ curl -fsSL https://ash.rayzor.tech/install.sh | sh

On Windows, run this in PowerShell:

$ irm https://ash.rayzor.tech/install.ps1 | iex

To emit object files for additional targets such as MIPS, LoongArch, or SPARC, install the -dev build. It includes every LLVM backend.

$ curl -fsSL https://ash.rayzor.tech/install.sh | sh -s -- --dev
$ $env:ASH_DEV=1; irm https://ash.rayzor.tech/install.ps1 | iex

The second command is for PowerShell. The -dev build is available for Linux x86_64, macOS arm64, and Windows x86_64. On other platforms, the installer uses the standard build.

02

Compile Haxe to bytecode

Ash runs HashLink bytecode, so build a .hl file with Haxe, or use one you already have.

$ haxe -main Main -hl main.hl
03

Run it

Pass your .hl file to Ash. Optionally, choose a preset for a game, server, or short script.

$ ash main.hl
$ ash --preset game main.hl # compile during load, not during play
$ ash --preset server main.hl # runs for weeks
$ ash --preset script main.hl # starts and exits
For instructions on building Ash from source, see the README.
04

Build an executable

--build compiles the bytecode and links an executable using your system's C toolchain. Set CC to select a different compiler driver.

$ ash --build mygame mygame.hl

Native executables target the build machine. To build WebAssembly, add --target wasm32-wasip1.

$ ash --build mygame.wasm --target wasm32-wasip1 mygame.hl

Ash includes the wasm linker and runtime. Run the module with ash run mygame.wasm, or use ash serve to open the generated page in a browser. See the WebAssembly guide for thread support, browser setup, and limitations.

Conformance

100% of Haxe's own
test suite passes

CI runs the official Haxe test suite without modifications on every push. The results show pass rates for each execution mode.

See the results → Benchmarks
Platforms

Supported platforms

Ash runs on macOS, Linux, and Windows. The table below lists runtime platforms, WebAssembly support, and targets that support object-file output.

macOS · Apple silicon
aarch64
macOS · Intel
x86_64
Linux · x86_64
validated continuously in CI
Windows
x86_64
WebAssembly
Runs in a browser or under a WASI host, with support for threads. See test results →
Objects only
x86 · ARM · RISC-V 32 and 64 · PowerPC64LE · s390x · every other LLVM backend with the -dev build
CI checks object-file generation for the targets in the last row; it does not execute the output. ash --emit-aot out.o --target <triple> prog.hl writes an object file. Linking requires the target platform's toolchain and runtime. The -dev release (curl -fsSL https://ash.rayzor.tech/install.sh | sh -s -- --dev, Linux x86_64, macOS aarch64 and Windows x86_64) includes all LLVM backends, including MIPS, LoongArch, and SPARC. These additional targets are only checked for object-file generation. ash --version reports (all LLVM targets) for this build. Benchmarks run on Linux x86_64.