unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.64k stars 266 forks source link

aarch64 support #3045

Open kubukoz opened 2 years ago

kubukoz commented 2 years ago

Hi, I'm wondering if there are any plans to provide ARM binaries - e.g. for M1 macs. Are there? 😅

ceedubs commented 2 years ago

This has come up a few times as a useful thing that we'll want to do. As far as I know GitHub Actions don't support building as an M1 Mac, but please let me know if you know of a good solution to this. We may be able to run builds on another CI that can build as an M1 Mac, but it might be a while before we get around to that.

aryairani commented 2 years ago

There is no official binary distribution of stack for darwin arm64 at the moment either. There is an unofficial binary provided by ghcup folks, but it segfaults for me. This is the first thing that would have to change before we'd have a timeline for M1 binaries.

@kubukoz Are you having some kind of trouble with the x86 build? Or just excited about arm64 like me?

kubukoz commented 2 years ago

It's just the efficiency I'm worried about 😄

aryairani commented 2 years ago

Gotcha — I'm no expert, but I'm operating under the assumption that Haskell code compiled with the arm64 backend could actually be slower than when compiled with the more mature x86 backend and then translated through Rosetta, so I think this could be the more efficient option for a while too. Plus, we're working hard to make ucm efficient in other ways :)

tfausak commented 3 weeks ago

For what it's worth, you should be able to build darwin arm64 binaries by adding macos-14 to your build matrix. That's what I do for Gild: https://github.com/tfausak/cabal-gild/blob/a2249ed/.github/workflows/ci.yml#L43

However I use Cabal rather than Stack. I think Stack support arm64 since version 2.13.1.

aryairani commented 3 weeks ago

We'll probably try to provide arm64 binaries through https://github.com/Homebrew/homebrew-core in not too long.

ceedubs commented 3 weeks ago

It would be nice to provide arm64 binaries independent of homebrew. For example it would be cool to be able to run Unison programs on Raspberry Pi and similar ARM machines running linux. Though I guess I don't know what builtins might not be supported on those platforms.