Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save a5an0/e2e4c7759446e933a055416756013826 to your computer and use it in GitHub Desktop.
Save a5an0/e2e4c7759446e933a055416756013826 to your computer and use it in GitHub Desktop.
# Want to cross compile your rust program from your m1 mac to run on aws lambda? do this
rustup target add x86_64-unknown-linux-musl
brew tap messense/macos-cross-toolchains
brew install x86_64-unknown-linux-musl
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=x86_64-unknown-linux-musl-gcc
export CC_x86_64_unknown_linux_musl=x86_64-unknown-linux-musl-gcc
cargo build --release --target=x86_64-unknown-linux-musl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment