lunatic-solutions / lunatic

Lunatic is an Erlang-inspired runtime for WebAssembly
https://lunatic.solutions
Apache License 2.0
4.57k stars 136 forks source link

chore: Remove macOS universal build #217

Open kosticmarin opened 11 months ago

kosticmarin commented 11 months ago

This was done in order to fix issues with existing universal binary which does not work on some macOS systems. Some people reported the following issue exec format error: lunatic.

@bkolobara I'm not sure how to test this without creating a tag?

bkolobara commented 11 months ago

I never figured out a way to test this without actually pushing to the repository.

Creating tags should be fine, as it only creates a "draft release" that we don't need to publish. I think you should be able to see draft releases with your repository permissions.

kosticmarin commented 11 months ago

@bkolobara Every thing looks good! Can You try out the new binaries on macOS, to see if the problems format are gone?

After we can delete the draft builds.

PS. Ignore the deny checks :smile:

bkolobara commented 11 months ago

It works!

But it also bundles the whole target directory structure. We should probably just include the binary at the top level, like on linux and windows.

I just remembered that we also have a hombrew formula that is automatically updated when a release is triggered. I couldn't find examples of formulas that have both arm and x64 binaries in it. With the universal build we always pointed to the same, but am unsure how it would work now.

kosticmarin commented 11 months ago

Ok, great catch I'll remove the directory structure!

Also I'll check what we can do about hombrew and how we can improve release there.

kosticmarin commented 11 months ago

I've fixed the directory structure when we package macOS builds.

Also I've checked some of the most popular rust project and how they are installed using Homebrew. Most of them are using cargo and installing from source via-a github release archive.

Here are some of the examples:

In short all their formula depend on depends_on "rust" => :build and they just run system "cargo", "install".