MCPcopy Create free account
hub / github.com/PacktPublishing/Rust-Web-Programming-3E

github.com/PacktPublishing/Rust-Web-Programming-3E @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
21,157 symbols 36,027 edges 12,941 files ⚖ MIT 4,357 documented · 21% updated 7mo ago★ 611 open issues

Browse by type

Functions 16,861 Types & classes 4,296
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Rust Web Programming, Third Edition

This is the code repository for Rust Web Programming, Third Edition, published by Packt.

A hands-on guide to Rust for modern web development, with microservices and nanoservices

Maxwell Flitton

      Free PDF       Graphic Bundle       Amazon      

About the book Rust Web Programming, Third Edition Rust is no longer just for systems programming. This book will show you why this safe and performant language is a crucial up-and-coming option for developing web applications, and get you on your way to building fully functional Rust web apps. You don’t need any experience with Rust to get started, and this new edition also comes with a shallower learning curve. You’ll get hands-on with emerging Rust web frameworks including Actix, Axum, Rocket, and Hyper. You’ll look at injecting Rust into the frontend with WebAssembly and HTTPS configuration with NGINX. Later, you’ll move onto more advanced async topics, exploring TCP and framing, and implementing async systems. As you work through the book, you’ll build a to-do application with authentication using a microservice architecture that compiles into one Rust binary, including the embedding of a frontend JavaScript application in the same binary. The application will have end-to-end atomic testing and a deployment pipeline. By the end of this book, you’ll fully understand the significance of Rust for web development. You’ll also have the confidence to build robust, functional, and scalable Rust web applications from scratch.

Key Learnings
  • Build scalable Rust web applications as monoliths or microservices
  • Develop a deeper understanding of async Rust
  • Get to grips with Rust language features like traits and the borrow checker
  • Manage authentication and databases in Rust web apps
  • Build app infrastructure on AWS using Terraform
  • Learn how to package and deploy Rust servers
  • Build unit tests and end-to-end tests for your Rust web apps with Python

Chapters Unity Cookbook, Fifth Edition
  1. A Quick Introduction to Rust
  2. Useful Rust Patterns for Web Programming
  3. Designing Your Web Application in Rust
  4. Async Rust
  5. Handling HTTP Requests
  6. Processing HTTP Requests
  7. Displaying Content in the Browser
  8. Injecting Rust in the Frontend with WebAssembly
  9. Data Persistence with PostgreSQL
  10. Managing User Sessions
  11. Communicating Between Servers
  12. Caching Auth Sessions
  13. Observability Through Logging
  14. Unit Testing
  15. End-to-End Testing
  16. Deploying Our Application on AWS
  17. Configuring HTTPS with NGINX on AWS
  18. Practicalities of Using Microservices and Nanoservices
  19. Low-Level Networking
  20. Distributed Computing

Requirements for this book You will need to know some basic concepts around HTML and CSS. You will also need to have some basic understanding of JavaScript. However, the HTML, CSS, and JavaScript is only needed for displaying data in the browser. If you are just reading the book to build backend API servers in Rust, then knowledge of HTML, CSS, and JavaScript is not needed. Some basic understanding of programming concepts such as functions and loops will also be needed as these will not be covered in the book.
Software/hardware covered in the bookOperating system requirements
RustWindows, macOS, or Linux (any)
Node (for JavaScript)Windows, macOS, or Linux (any)
Python 3Windows, macOS, or Linux (any)
DockerWindows, macOS, or Linux (any)
docker-composeWindows, macOS, or Linux (any)
PostmanWindows, macOS, or Linux (any)
TerraformWindows, macOS, or Linux (any)
To take full advantage of the deployment on AWS chapters, you will need an AWS account, which might cost if you are not eligible for the Free Tier. However, the builds are automated with Terraform, so spinning up builds and tearing them down will be quick and easy, so you will not need to keep the infrastructure running while working through the book, keeping the costs to a minimum. By the of this book, you will have a solid foundation of building and deploying Rust servers. However, it must be noted that Rust is a powerful language. As this book focuses on web programming and deployment, there is scope for improvement in Rust programming aft er the book. Further reading on Rust is advised aft er the book to enable you to solve more complex problems.

Get to know the author

_Maxwell Flitton_ is the CTO at Kioko, where he applies the engineering techniques present in this book to build production systems with 100% unit test coverage. Kioko is essentially Cursor for CAD, helping teams move faster from ideas to manufacturable geometry and working with Formula 1 teams on designing components for their cars. Maxwell previously worked in open-source fi nancial loss modeling at Oasis LMF. After that, he joined SurrealDB, where he helped build the database’s machine learning engine, before moving on to Kioko. He was also an early soft ware engineer at Monolith AI (since acquired by CoreWeave). Maxwell is an Honorary Researcher at King’s College London, applying Rust to computer vision for surgical robotics. In 2011, Maxwell earned a BSc in Nursing from the University of Lincoln (UK). While working 12-hour shifts in A&E departments, he completed a Physics degree with the Open University, followed by a Postgraduate Diploma in Physics and Engineering in Medicine at UCL (London).

Other related books

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 12,994
Method 3,867
Class 2,655
Interface 1,202
Enum 439

Languages

Rust84%
TypeScript16%
Python1%

Modules by API surface

chapter02/verifying-with-traits/src/main.rs17 symbols
new-chapter17/implementing-https-locally-with-docker-compose/nanoservices/to_do/networking/actix_server/src/api/basic_actions/delete.rs15 symbols
chapter17/implementing-https-localy/nanoservices/to_do/networking/actix_server/src/api/basic_actions/delete.rs15 symbols
chapter17/creating-security-groups/nanoservices/to_do/networking/actix_server/src/api/basic_actions/delete.rs15 symbols
chapter17/creating-multiple-ec2-instances/nanoservices/to_do/networking/actix_server/src/api/basic_actions/delete.rs15 symbols
chapter17/creating-a-load-balancer-for-our-traffic/nanoservices/to_do/networking/actix_server/src/api/basic_actions/delete.rs15 symbols
chapter17/attaching-an-elastic-ip-to-server/nanoservices/to_do/networking/actix_server/src/api/basic_actions/delete.rs15 symbols
chapter16/setting-up-terraform/nanoservices/to_do/networking/actix_server/src/api/basic_actions/delete.rs15 symbols
chapter16/deploying-our-system/nanoservices/to_do/networking/actix_server/src/api/basic_actions/delete.rs15 symbols
chapter16/defining-the-build-config-for-our-monolith/nanoservices/to_do/networking/actix_server/src/api/basic_actions/delete.rs15 symbols
chapter16/defining-the-build-config-for-our-microservices/nanoservices/to_do/networking/actix_server/src/api/basic_actions/delete.rs15 symbols
chapter16/building-the-base-docker-image-for-all-servers/nanoservices/to_do/networking/actix_server/src/api/basic_actions/delete.rs15 symbols

Datastores touched

to_doDatabase · 1 repos

For agents

$ claude mcp add Rust-Web-Programming-3E \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page