puma / puma-dev

A tool to manage rack apps in development with puma

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Binaries for MacOS with ARM64

santostiago opened this issue · comments

I installed puma-dev using brew install puma/puma/puma-dev in a Macbook Pro M1 with the new Apple Silicon (ARM64 architecture) but when it's running I can see that it's running in x86_64 using Rosetta.
Is there a way I can run it natively in ARM64?

I'm fairly confident that gox can produce a darwin-arm build that can be distributed via Homebrew.

Will investigate this week. Are you available and willing to test an ARM release?

@nonrational sure :) Just ping me!

@nonrational any news on this? :)

I upgraded to 1.16, added arm64 output to gox, and attempted to cut a binary, but launch_socket (which allows puma-dev to bind to ports <1024) imports C headers and refuses to build.

$ gox -os="darwin" -arch="amd64 arm64" -ldflags "-X main.Version=$RELEASE" ./cmd/puma-dev
Number of parallel builds: 11

-->    darwin/arm64: github.com/puma/puma-dev/cmd/puma-dev
-->    darwin/amd64: github.com/puma/puma-dev/cmd/puma-dev

1 errors occurred:
--> darwin/arm64 error: exit status 1
Stderr: package github.com/puma/puma-dev/cmd/puma-dev
	imports github.com/puma/puma-dev/dev
	imports github.com/puma/puma-dev/dev/launch: build constraints exclude all Go files in /Users/norton/src/puma-dev/dev/launch

So, need to find some time to investigate.

@nonrational any news on this? Is there any way I can help to test things out or something?

Not as of yet. Still haven't figured out why build constraints prevent building launch_darwin.go on darwin-arm.

WIP branch: https://github.com/puma/puma-dev/tree/darwin-arm

Edit: I suspect we may need to add flags to get it to build w/ the macOS sdk which may have the arm versions of the c libs.

Alright, if someone on an M1 can extract the binary from https://github.com/puma/puma-dev/releases/download/v0.16.1/puma-dev-0.16.1-darwin-arm64.zip and give it a shot, that'd be helpful! 🤞

@nonrational Thank you! I'll test it over the weekend :)

@nonrational it all seems to work fine :)
I tested all my apps and they're up and running natively.
Let me know if there's something you'd like me to test or some monitoring tool that I should use to analyze it.

Thank you :)

Great! Thanks @santostiago.

I'll get the updated binaries into the homebrew formula in the next week or so.

Edit: "next week" in this case means next few months, I guess. 😅

FYI When I move the file from the zip it shows a message saying it's not verified by apple.

What's the latest on this? Installing the package from Homebrew appears to still not work on an M1 machine and the release linked in the message above on the 29th April now 404s. Thanks

arm64 build is now available via the homebrew tap. Please give it a try and report back with any issues. 🙏