DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • How to Document Your AWS Cloud Infrastructure Using Multicloud-Diagrams Framework
  • Unleashing the Power of AWS: Revolutionizing Cloud Management Through Infrastructure as Code (IaC)
  • Top 9 Role-Based Cloud Certifications for Solution Architects in 2024
  • How To Understand and Choose Your First EC2 Instance on AWS

Trending

  • While Performing Dependency Selection, I Avoid the Loss Of Sleep From Node.js Libraries' Dangers
  • Solid Testing Strategies for Salesforce Releases
  • Is Agile Right for Every Project? When To Use It and When To Avoid It
  • The 4 R’s of Pipeline Reliability: Designing Data Systems That Last

17 Open Source Projects at AWS Written in Rust

Have you found yourself asking, "Is Rust actually useful for me?" Here, find some examples of where it’s been useful.

By 
Rashmi Nambiar user avatar
Rashmi Nambiar
·
Feb. 16, 23 · Analysis
Likes (3)
Comment
Save
Tweet
Share
9.8K Views

Join the DZone community and get the full member experience.

Join For Free

This article was authored by AWS Senior Software Developer Engineer, Tim McNamara, and published with permission.

Lots of people have been investigating Rust recently. That raises an important question: “Is Rust actually useful for me?” While we can’t tell you whether it’s appropriate for your use case, we can share some examples of where it’s been useful for us.

These projects serve as a representative sample of what we've created so far and provide a glimpse into our use of Rust. We hope that by inspecting the code, you can learn from our work and get inspired to experiment with Rust at your workplace. 

Keep in mind that this list is not exhaustive: there are more open-source projects to explore, particularly within the AWS and AWS Labs organizations in GitHub.  We hope you find these projects informative and valuable! 

Systems Programming

Rust rose to prominence as a systems programming language, offering memory safety benefits that are unavailable in its peer languages, such as C and C++. This field, specifically virtualization, is where AWS first utilized Rust for large-scale projects.

Bottlerocket

Bottlerocket is an operating system designed for hosting containers. It includes only the essential software required to run containers and ensures that the underlying software is always secure. For example, it’s impossible to SSH into a container running in Bottlerocket: running containers don’t even have a shell, let alone sshd.

Firecracker

Firecracker powers AWS Lambda and AWS Fargate. It runs workloads in lightweight virtual machines called micro VMs, which combine speed and flexibility (which we’re used to from containers) with security and isolation (which we’re used to from virtual machines).

Web Services

As Rust became increasingly commonplace within AWS, projects began to appear that were broader than the initial systems programming domain. It is now a language that has a strong user base developing web-facing services.

Rust Runtime for AWS Lambda

Serverless is becoming increasingly mainstream within the technology industry, and serverless Rust is an excellent way to make use of this new paradigm. The Rust Runtime for AWS Lambda provides a custom runtime for AWS Lambda that’s ergonomic to use and offers a performance boost versus other runtimes.

smithy-rs

Keeping servers and clients up-to-date as APIs change is a difficult task. The Smithy Interface Definition Language (IDL) simplifies this by delegating the bookkeeping to software. The Rust implementation is called smithy-rs. It can generate clients and servers in Rust while enabling business logic to be implemented within developers’ preferred languages such as Python. smithy-rs is an interesting project internally, as it is an example of using Kotlin and Rust within the same code base. smithy-rs is used to generate the open-source crates that belong to AWS SDK for Rust.

AWS SDK for Rust

The AWS SDK for Rust enables AWS services to be accessed programmatically from Rust programs. The whole SDK encompasses dozens of crates, each corresponding to an AWS service, all of which are available for inspection within the SDK’s GitHub repository.

Testing

While Rust’s type system provides many guarantees, it doesn’t prevent all bugs. We’ve created a few tools to expand the robustness of software written across the company and beyond.

Kani Rust Verifier

Kani Rust Verifier is part of a family of tools called “model checkers” to enable mathematical reasoning about software. Kani provides lightweight formal verification within Rust projects. In fact, Firecracker’s security is formally verified with Kani. You can use Kani in your own programs to increase their robustness to errors that unit and integration tests are likely to miss.

Shuttle

Shuttle is a tool for testing concurrent code that works by controlling the scheduling of each thread and scheduling those threads randomly. By controlling the scheduling, Shuttle allows us to reproduce failing tests deterministically.

CLI Utilities

Developers at Amazon have also found that writing CLIs in Rust is very worthwhile. The type system prevents many tricky runtime errors during development. CLIs written in Rust are easy to distribute, run very fast, and use very little memory.

Amazon Ion

Amazon Ion is a data format that comes with a CLI written in Rust. What’s a data format? You’ve probably seen JSON around — that’s an example of a data format. JSON is text-based, which is readable but can take up unnecessary space. It can also be unclear from receiving a file whether it contains the correct fields and data types. Unlike JSON, Ion provides both text and binary forms of its data model, to make it easy to inspect data on the fly. The CLI also enables you to validate a file against a schema.

AWS CloudFormation Guard

AWS CloudFormation Guard validates CloudFormation specifications. This can enable you to prevent mistakes entering production for people who are following an infrastructure as code methodology by including it as a pre-commit hook.

Nitro Enclaves Command Line Interface (Nitro CLI)

Nitro CLI is a tool for managing the lifecycle of Nitro Enclaves. Enclaves enable AWS customers to protect their most sensitive data by housing that data within an isolated, hardened, and highly constrained environment.

Other Utilities

Rust has also proven to be worthwhile in less prominent locations. coldsnap makes it easy to upload and EBS download snapshots from the command line, while dynein provides a CLI for Amazon DynamoDB. Flowgger can ingest, transform, and export logs from multiple sources. To provide error-bounded timestamps, ClockBound works with the chrony NTP server to enable disparate events to be ordered, independent from geographic locations of the source.

Libraries and Developer Tools

As experience is gained, it’s common for people to share what they’ve learned. By inspecting the AWS and AWS Labs Github organizations, it’s clear that the number of libraries written in Rust is growing.

s2n-quic

Cryptographic applications were another area where early experiments were taken with Rust. One of the downstream outcomes of that work is our open-source implementation of post-quantum key exchange for TLS, which is found in the s2n-quic QUIC implementation.

cargo-check-external-types

cargo-check-external-types is a Cargo plugin for Rust library authors. It helps to make sure that the library’s API stays consistent, even if a dependency changes. Essentially, it checks which types from other libraries can be part of their public API, so a change to a dependency doesn't break their library.

DCV Color Primitives

To convert between color models in different applications, a common library makes a lot of sense. The DCV Color Primitives library can convert between multiple pixel formats, while also supporting being easy to compile to multiple target architectures, including ARM (which includes Graviton family of CPUs) and WebAssembly. 

AWS Cloud

Opinions expressed by DZone contributors are their own.

Related

  • How to Document Your AWS Cloud Infrastructure Using Multicloud-Diagrams Framework
  • Unleashing the Power of AWS: Revolutionizing Cloud Management Through Infrastructure as Code (IaC)
  • Top 9 Role-Based Cloud Certifications for Solution Architects in 2024
  • How To Understand and Choose Your First EC2 Instance on AWS

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!