Programming

Integration of Axum with S3 storage

Recently, I encountered a challenge in integrating the Axum web framework and the rust-s3 library. The task at hand is to create two endpoints:

  1. Uploading a file to storage and obtaining a link.
  2. Downloading a file from storage using a link.

Of course, this should be done without using temporary files and without holding the entire file data in memory.

In this article, you'll find the complete code required to implement this functionality, accompanied by brief explanations.

Axum vs Actix vs Rocket

Логотип Rust

As Rust's prominence in web development continues to surge, this article embarks on an in-depth exploration, conducting a comprehensive performance evaluation of the three most coveted web frameworks - Axum, Actix and Rocket. We will not only compare their performance but also delve into their key features, assess documentation quality, and conduct rigorous performance testing. Through this analysis, we will build a simple REST service with three distinct endpoints, each using one of these frameworks. One endpoint delivers a formatted string, the second introduces a 20-millisecond delay to simulate light database work or an external service call, and the third performs resource-intensive work by calculating a bcrypt hash, simulating complex business logic. Whether you're a seasoned Rust developer or new to the language, this article equips you with invaluable insights to make well-informed decisions for your upcoming web projects.