Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What target triple should I use to build a Rust project for an AWS Graviton2 instance?

I would like to cross compile Rust code on my amd64 host system to run on an AWS Graviton2 instance.

Based on Getting started with C/C++ on Graviton guide, it seems like I want something like armv8. The only such triples in the list of Rust's supported target triples start with thumbv8m. I don't know anything about ARM, so not sure if these are what I want, and if so, which one.

like image 807
Nicholas Bishop Avatar asked Sep 21 '20 17:09

Nicholas Bishop


People also ask

What is AWS graviton2?

Amazon Web Services (AWS) offers Elastic Compute Cloud (EC2) Graviton2 processor-based instances utilizing 64-bit Arm Neoverse cores. AWS Graviton2 processors deliver a significant leap in performance and capabilities over the first-generation AWS Graviton processor (A1 series) instances.

Does AWS support Rust programming?

AWS has committed to supporting the Rust community and using the language to deliver fast and robust services to customers at scale, and we want to enable our customers to do the same. We also include instructions for building and installing the rust-analyzer and CodeLLDB debugger plugins to add additional language features.

What are the different types of Amazon graviton2 instances?

Amazon has released Graviton2 instances across General Purpose, Compute Optimized, and Memory Optimized families in M6g, C6g, and R6g types. For applications that require local storage, NVMe SSD local instance storage variants like C6gd, M6gd, and R6gd are available.

What is the graviton2 solution?

The solution consists of an EC2 Graviton2 instance located in a private VPC subnet routed through an AWS Global Accelerator accelerator to provide routing optimization and keep packet loss, jitter, and latency lower by up to 60%.


1 Answers

The correct target will be aarch64-unknown-linux-gnu. You could also perform Arm-native compilation on the AWS Graviton2 instance.

like image 130
Jeff U Avatar answered Oct 19 '22 00:10

Jeff U