Running Rust on AWS Lambda on ARM64

This page summarizes the projects mentioned and recommended in the original post on dev.to

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • lambda-rust-arm64

    An AWS Lambda function built to cross compile to arm64 for use with the new Lambda platform.

    TL;DR: Rust on ARM64 Lambda: check out my example repo

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • aws-lambda-rust-runtime

    A Rust runtime for AWS Lambda

    The [[bin]] section allows us to specify the binary filename for what's built (and saves us renaming the file after compilation). The dependencies are all references and dependencies of the AWS Rust runtime crates - that's where the code for the function we'll be using is pulled from.

  • rust-musl-cross

    Docker images for compiling static Rust binaries using musl-cross

    The example that is provided in the AWS Rust runtime repository shows them using a custom linker and rustup target in order to cross-compile for x86-based lambdas. I attempted to dive into how to get a arm64-based linker, but in the process of trying to figure out how to get that linker installed locally (no convenient packages for Ubuntu, sorry), I stumbled across a project that provides cross-compilation tooling for various platforms via Docker. That made my life a lot easier - Using the rust-musl-cross Docker container, all I have to do is wrap the call to cargo build, and it builds for the proper architecture:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • How do I cross compile for Rasperry Pi 64 bit on Windows?

    7 projects | /r/learnrust | 11 Feb 2023
  • Hey Rustaceans! Got a question? Ask here! (36/2022)!

    5 projects | /r/rust | 5 Sep 2022
  • Show /r/rust: a Rust implementation of the Realworld demo app spec using Axum and SQLx, written by a co-author of SQLx.

    11 projects | /r/rust | 31 Jan 2022
  • Guidance about cross compilation tools, especially targeting musl

    5 projects | /r/rust | 4 Nov 2021
  • rust-musl-cross docker images added linux/arm64 architecture support

    2 projects | /r/rust | 23 Mar 2021

Did you konow that Shell is
the 10th most popular programming language
based on number of metions?