aws / aws-lambda-runtime-interface-emulator

Apache License 2.0
921 stars 95 forks source link

release binaries that work on mac #55

Closed teyckmans closed 2 years ago

teyckmans commented 2 years ago

Would be nice to have binaries included on a release that target Mac.

For now I had to change the Makefile to build for GOOS=darwin as a work around.

skwashd commented 2 years ago

@teyckmans I'm not sure why you want this. The first line of the README says "The Lambda Runtime Interface Emulator is a proxy for Lambda’s Runtime and Extensions APIs, which allows customers to locally test their Lambda function packaged as a container image". macOS isn't an option on Lambda.

You should be using the RIE as documented.

teyckmans commented 2 years ago

I am trying to create graalvm native-image lambdas, the easiest way for now is to run the emulator with the lambda as a java process and use the graalvm agent that collects all the graalvm config during test execution, after that I can use the gathered config to produce a native-image.

Currently I am just doing this locally on a mac, I can also do that through docker.

wichert commented 2 years ago

Shouldn't this be reopened? The README is pretty clear that macOS is supported, but the install instructions give you a Linux-only binary.

kdemkin commented 1 year ago

It's not a big deal to build it for macOS CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w" -o bin/aws-lambda-rie-arm64 ./cmd/aws-lambda-rie bin/aws-lambda-rie-arm64

But I agree with @wichert, the binary attached to the README won't work on Apple Silicone macs.