Skip to content

Instantly share code, notes, and snippets.

View onehundredfeet's full-sized avatar

Ryan Cleven onehundredfeet

  • Vancouver
View GitHub Profile
@onehundredfeet
onehundredfeet / HaxeHashlinkM1.md
Last active January 30, 2023 05:37
Developing for Haxe / Hashlink on an M1

Challenge

Getting Haxe, and especially Hashlink, up and running on an Apple M1 is not easy. We'll try to put our heads together and come up with any recipes for success that people have found.

Intel vs Arm with Hashlink

The first thing to note, is that the Hashlink JIT does not work with the M1 (arm) instruction set. To develop with the Hashlink, we end up using a combination of arm64 compiled tools and x86/64 tools libraries.

The M1 Mac's can run x64 (Intel) applications using a technology called 'Rosetta' that translates the x86 code into arm64 code at runtime. We can use this to run Hashlink, with the JIT, effectively. At the moment, there is no known way to run the Hashlink debugger on an M1 Mac.

Using the Command Line

Developing on the M1 will require understanding what architecture your current terminal is set up for.