A hands-on guide for building tested Rust web applications with authentication and databases. These web applications utilize distroless docker, terraform, Github actions, and postman to be tested and deployed on AWS with HTTPS.
Key Features
- Learn cutting edge web techniques such as distroless Rust servers, terraform, and AWS deployment
- Cover async concepts like actors and queuing tasks using lower level frameworks like Tokio
- Build a full web application in Rust with a database, authentication, and front-end
Book Description
Rust in web programming is gaining in popularity because of its small size, memory safety, and speed. There have been numerous case studies of companies switching from other languages such as Python, Ruby, and even Golang resulting in faster computation speeds and less memory consumption.
This book offers a practical hands on guide to build fully operational web applications in Rust that utilize databases and authentication to build a to do application. not just that, this book covers building cloud infrastructure on AWS with terraform, HTTPS, and custom URL routing. The book enables the reader to deploy Rust web applications on AWS with a database and custom URL that is protected with encryption that has end to end testing performed using Postman. The traffic is load balanced across multiple servers in different regions. You'll learn advanced techniques such as wrapping Rust applications in Distroless Docker images with SSL and database drivers resulting in the entire Rust server being the total size of 50mb. You'll discover lower-level concepts with the Tokio framework to apply the actor model for complex async problems, building custom TCP protocols, and queuing tasks to be processed.
By the end of this book, you will be confident in your skills to build robust, functional and scalable web applications right from scratch.
What you will learn
- How to structure and build scalable Rust web applications by building a basic to do list web application
- Learn to manage authentication and databases in Rust web applications
- How to wrap web applications in distroless Docker resulting in Rust web application docker images being the size of 50mb with database drivers and SSL
- Fundamentals of the building blocks of web development such as HTTPS, TCP, and middleware
- How to build basic infrastructure on AWS using Terraform with databases, servers, load balancers, HTTPS, and URL routing
- How to build end to end tests using Postman
- Build async systems implementing the actor model using Tokio
Who This Book Is For
This book is for web developers who have some coding experience in another language such as Python, Ruby, or JavaScript who want to learn how to build web applications in Rust. No previous experience in Rust is needed. Some HTML, CSS might be useful for the front-end chapters, however, you will be able to skip these chapters if desired and be able to complete the book. The book also teaches the reader how to build, test, and deploy on to AWS using bash, docker, and postman. No previous experience in these tools are needed as they are introduced in the book.
Table of Contents
- A Quick Introduction to Rust
- Designing Your Web Application in Rust
- Handling HTTP Requests
- Processing HTTP requests
- Displaying Content in the browser
- Data persistence with PostgreSQL
- Managing User Sessions
- Building RESTful Services
- Testing Our Application Endpoints and Components
- Deploying our application on AWS
- Configuring basic HTTPS with NGINX
- Rocket
- Warp
- Exploring the Tokio framework
- (N.B. Additional chapters to be confirmed upon publication)