-
Notifications
You must be signed in to change notification settings - Fork 361
Compiling to macOS + Windows target not supported? #623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This package uses cross-compilation to produce Linux-native binaries for deployment into Lambda. Under this model, there isn't really a method to support macOS and Windows executables. |
That isn’t strictly true though, as running watch does indeed produce a macOS binary on my local machine. |
if you want to compile for whatever platform you're compiling on, can't you just |
You should be able to specify the target for -target <TRIPLE> Build for the target triple [env: CARGO_BUILD_TARGET=] You could find the target triples in rustc doc here. |
@greenwoodcm: you're right, it does look like |
Oh, cargo lambda limits the targets.
|
Dope, I'll consider this solved then! If you're amenable (and think it'd be worthwhile), I'd be happy to open a PR for a minor readme update. |
|
Hello! This issue follows up on #390 (👋🏼 @calavera Architect Sandbox support for Rust is finally quite close!)
So, as before, Architect Sandbox provides a full, Docker-free solution for running API Gateway + Lambda on Macs, Windows, and Linux machines. We now have Lambda Runtime API support nearly complete, and I'm working towards releasing an officially Architect + AWS Lambda Rust Runtime plugin that will seamlessly allow folks to author Rust Lambda functions, test them in Sandbox on their local machine, and deploy that code to real Lambda.
Unfortunately, it looks like right now the Rust runtime (via Cargo Lambda) only appears to support building to AWS Linux (see: here, here). Am I missing something? How can we build to the host platform and execute natively for local testing before shipping?
This does seem possible, as I pieced together
cargo lambda watch
+cargo lambda invoke
compiles something platform native, but it doesn't appear to be obviously exposed, and I'm not sure how to verify that because (for me)watch
+invoke
is currently broken:tab 1 (
sudo cargo lambda watch -a 127.0.0.1 -p 9000)
tab 2 (
cargo lambda invoke --data-ascii "{ \"command\": \"hi\" }"
)Note:
invoke
documentation doesn't mentionwatch
at all.Steps to reproduce
cargo lambda new $function_name
)watch
+invoke
→ brokenThe text was updated successfully, but these errors were encountered: