You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, the documentation recommends using cargo build directly, or running the build in a Docker container which can cause issues based on the platform someone is using. For example:
Zigbuild is a promising alternative for cargo build for cross-compilation, which works on M1 macs out of the box (while cross doesn't work well on M1 macs).
Why is cross compilation hard for lambda_runtime?
lambda_runtime depends on ring, which uses assembly and thus requires external tools to compile to the target architecture. Setting up those tools depends on the host architecture and can be error-prone.
Proposal
Mention provided.al2 as the preferred option to deploy Rust functions on AWS Lambda
Mention zigbuild as the preferred option for cross-compilation
Propose zigbuild with $(ARCH)-unknown-linux-gnu.2.17 as the preferred way to compile for AL1 runtimes instead of MUSL
The text was updated successfully, but these errors were encountered:
Strongly second this. I am using a M1 MacBook Pro and working through the issues that came up trying to compile to x86_64 with @nmoutschen led to the use of zigbuild and working builds I could deploy.
At the moment, the documentation recommends using
cargo build
directly, or running the build in a Docker container which can cause issues based on the platform someone is using. For example:Zigbuild is a promising alternative for
cargo build
for cross-compilation, which works on M1 macs out of the box (whilecross
doesn't work well on M1 macs).Why is cross compilation hard for
lambda_runtime
?lambda_runtime
depends on ring, which uses assembly and thus requires external tools to compile to the target architecture. Setting up those tools depends on the host architecture and can be error-prone.Proposal
provided.al2
as the preferred option to deploy Rust functions on AWS Lambda$(ARCH)-unknown-linux-gnu.2.17
as the preferred way to compile for AL1 runtimes instead of MUSLThe text was updated successfully, but these errors were encountered: