Leanpub Header

Skip to main content

Modern Web Apps using Rust, Second Edition

Build full-stack app on a framework-agnostic core, using Axum, Actix Web, Leptos and PostgreSQL

This book is 100% completeLast updated on 2026-08-01

In this book, we are building a complete working server, and again we rebuild the whole thing on a different framework. It's about testing out a new approach. If the architecture is honest, the second version costs almost nothing and the business logic never moves. We ran the test, and I let you watch the result rather than describing it.

Minimum price

$29.99

$29.99

You pay

Author earns

Packages

Details
$

Also available for 2 book credits with a Reader Membership

PDF
EPUB
1 Previous Editionwith 27 Readers
About

About

About the Book

Halfway through this book you build the entire server again, on a different web framework.

This book isn't for practice, but to test out the architecture. All you are learning in this book, is build a full-stack Rust application, on Axum, and then rebuild it again on Actix Web 4, and the domain crate won't change at all. Under both, you'll find a pinned Rust 1.95 and edition 2024 toolchain, business rules that don't rely on any framework, and PostgreSQL accessed through SQLx with queries and transactions that are verified at compile time.

When you're done there, you'll have versioned REST APIs and a GraphQL schema, OAuth2 sign-in with GitHub, JWT claims and Argon2 hashing, and a reactive Leptos storefront compiled to WebAssemblyWith WebSockets, you can stream live updates, size Tokio runtimes and connection pools by measurement, then ship to Kubernetes through a gated pipeline. The idea is not to turn you into a Rust expert overnight, but to equip you with the knowledge to build something that will keep on going long after its dependencies are obsolete.

Key Learnings
  • Separate business rules into a domain crate depending on no framework, database or runtime.
  • Build asynchronous web services on Axum with typed state, extractors and tower middleware.
  • Rebuild same server on Actix Web 4 and work with per-worker arbiter model.
  • Query PostgreSQL through SQLx using reversible migrations and transactions.
  • Publish versioned REST APIs and a GraphQL schema with DataLoader batching.
  • Add OAuth2 sign-in with GitHub, JWT claims and Argon2 password hashing.
  • Build reactive Leptos front-end compiled to WebAssembly, with server-side rendering.
  • Stream live updates over WebSockets, and tune Tokio runtimes and connection pools.
  • Containerize with Docker and cargo-chef, and ship to Kubernetes through CI pipeline.

Table of Content
  1. Setting up Rust 2024, Zed and Leptos
  2. Designing Modern Architecture
  3. Building App Server with Axum
  4. Building Server with Actix Web
  5. Database Integration and State Management
  6. Modern Interactions with REST, GraphQL and OAuth
  7. Front-end Development with Leptos and WebAssembly
  8. Real-time Interactions using WebSockets
  9. Modern Security, Performance and Tuning
  10. Cloud-native Releases and Continuous Delivery

Packages

Pick Your Package

All packages include the ebook in the following formats: PDF and EPUB

This book only

Minimum price

Suggested price$29.99

$29.99

    This book + Extras Downloadable (Modern Web Apps using Rust, 1st Edition)

    Minimum price

    Suggested price$56.99

    $49.99

    • Modern Web Apps using Rust, 1st Edition
      Build full-stack applications using Rust-based Leptos framework, GraphQL, WebAssembly, and cloud-native deployment

    This book is also available in the following packages:

    • This book + Extras Downloadable (Rust In Practice, Third Edition)

      No Description Available

      • Rust In Practice, Third Edition
        Explore Concurrency, Memory Safety, GPU Computing, Linux Kernels, and Real-World Systems using Rust 1.85. This third edition covers Rust 1.85 and the Rust 2024 Edition in full. The new chapters on concurrency, the 2024 edition migration, GPU computing, Go integration, and Linux kernel programming show where the Rust community has moved since the second edition, and where systems programming as a discipline is heading.
      Minimum price
      $49.99
      Suggested price
      $56.99
    • This book + Extras Downloadable (WebAssembly 2.0 Essentials, Second Edition)

      No Description Available

      • WebAssembly 2.0 Essentials, Second Edition
        The latest version of WebAssembly has arrived and it has some really cool new features. I knew that I had to completely rewrite this book to make sure it was up to date. Now, here we are. Within this book, I will take you from the very basics of memory, control flow, and the mechanics that make Wasm work, through to compiling multiple languages, building multi-threaded applications, and many more...
      Minimum price
      $49.99
      Suggested price
      $56.99
    • This book + Extras Downloadable (Above all 3 books)

      No Description Available

      • Rust In Practice, Third Edition
        Explore Concurrency, Memory Safety, GPU Computing, Linux Kernels, and Real-World Systems using Rust 1.85. This third edition covers Rust 1.85 and the Rust 2024 Edition in full. The new chapters on concurrency, the 2024 edition migration, GPU computing, Go integration, and Linux kernel programming show where the Rust community has moved since the second edition, and where systems programming as a discipline is heading.
      • WebAssembly 2.0 Essentials, Second Edition
        The latest version of WebAssembly has arrived and it has some really cool new features. I knew that I had to completely rewrite this book to make sure it was up to date. Now, here we are. Within this book, I will take you from the very basics of memory, control flow, and the mechanics that make Wasm work, through to compiling multiple languages, building multi-threaded applications, and many more...
      • Modern Web Apps using Rust, 1st Edition
        Build full-stack applications using Rust-based Leptos framework, GraphQL, WebAssembly, and cloud-native deployment
      Minimum price
      $79.99
      Suggested price
      $86.99

    Bundle

    Bundles that include this book

    Author

    About the Author

    GitforGits | Asian Publishing House

    We are the engineer’s publisher, the coder’s mentor, and the content alchemist—meticulously turning dense tech into practical gold. With a growing library of 100+ titles, we don’t just develop technical books, rather we build roadmaps for professionals across Python, MySQL, DevOps, Rust, AI, Kotlin, Arduino, Golang and everything around the massive IT ecosystem. Every chapter, every script, every project is a tool in the hands of developers who want to get things done.

    Where others summarize, we construct step-by-step learning blueprints, cutting through clutter, banning the fluff, and ensuring every paragraph delivers hands-on value. Our audience isn’t learning from scratch—they’re leveling up with purpose, and we stand by them with code-first content, consistent project workflows, and a zero-redundancy approach.

    The Leanpub 60 Day 100% Happiness Guarantee

    Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

    See full terms...

    Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

    We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

    (Yes, some authors have already earned much more than that on Leanpub.)

    In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

    Learn more about writing on Leanpub

    Free Updates. DRM Free.

    If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

    Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

    Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

    Learn more about Leanpub's ebook formats and where to read them

    Write and Publish on Leanpub

    You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

    Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

    Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

    Learn more about writing on Leanpub