hashlink icon indicating copy to clipboard operation
hashlink copied to clipboard

Macbook M1 Support

Open wihu opened this issue 1 year ago • 3 comments

After cloning and building hashlink from repo, running hl command gives me segmentation fault. Searching around the internet suggests that hashlink does not support arm64. Tried to build using Rosetta, however, it seems a bit more complicated since it requires a variant of homebrew that is installed with x86_64 as well, while I have other projects which requires homebrew arm64.

Will there be a direct support for running hashlink on arm64 in the foreseeable future?

wihu avatar Apr 18 '24 04:04 wihu

it requires a variant of homebrew that is installed with x86_64 as well, while I have other projects which requires homebrew arm64.

You should be able to have both x64 and arm64 homebrew installed, they use separate locations to install packages.

Apprentice-Alchemist avatar Apr 18 '24 06:04 Apprentice-Alchemist

https://gist.github.com/onehundredfeet/92e48e437b0ecc22935f49da3d966c38

yz-xlame avatar Aug 18 '24 14:08 yz-xlame

Are there any plans on getting it compiled natively for Apple silicone?

thomasjwebb avatar Mar 11 '25 04:03 thomasjwebb

Are there any plans on getting it compiled natively for Apple silicone?

Little bit of shameless self-advertisement - but a viable option could be the hlc command that's part of crashlink (see source here). It's not quite functional yet, and I've mostly stopped working on it, but it should provide a good starting point (and I welcome PRs!). HL/C is the only real viable way of running HL bytecode natively on ARM, and in theory you could, easily enough, recompile the required native libs for a given bytecode module, link them against the generated C, then use that resulting binary.

N3rdL0rd avatar Sep 09 '25 21:09 N3rdL0rd