Modern Web Apps Using Rust


Download Modern Web Apps Using Rust PDF/ePub or read online books in Mobi eBooks. Click Download or Read Online button to get Modern Web Apps Using Rust book now. This website allows unlimited access to, at the time of writing, more than 1.5 million titles, including hundreds of thousands of titles in various foreign languages.

Download

Modern Web Apps using Rust


Modern Web Apps using Rust

Author: Nira Talvyn

language: en

Publisher: GitforGits

Release Date: 2025-01-25


DOWNLOAD





This book introduces you to web development with Rust and Leptos. To begin with, you install a solid Rust toolchain and set up Leptos in VS Code, and then you see your first "Hello World" interface rendered via WebAssembly right away. So, first you'll design a microservice-inspired book-selling sample app, called LibroCommerce, into inventory, orders, and user accounts. Then, you'll connect each piece with Axum handlers, SQLx queries, and shared Serde models. By the time you get to Chapter 3, you'll have built a nonblocking, Tokio-driven server that handles dynamic routes, powers Leptos SSR pages, and secures endpoints with JWT and OAuth2. Then, you add real-time features: WebSockets send stock updates and order-status events to reactive Leptos signals, keeping the UI and backend in sync. As you go, you'll be writing end-to-end Playwright tests and setting up GitHub Actions so that every commit runs Rust tests, Playwright scenarios, Docker builds, and Kubernetes rollouts automatically. You'll learn how to connect to PostgreSQL with an async pool, model Books, Users, and Orders with Serde-annotated Rust structs, and implement CRUD, password hashing with Argon2, encrypted backups, and session stores in Redis. Performance tuning shows you how to optimize Tokio threads, tune SQLx pools, stream large result sets, debounce client inputs, and apply backpressure. At last, you put each microservice and frontend into Docker containers, deploy them with Kubernetes, and then use serverless. It's packed with over 100 bite-sized examples and ready-to-run solutions, and it'll walk you through building and operating a production-style web application in Rust, step-by-step. You won't become a Rust language expert, but you'll finish ready to design, code, test, and deploy modern web apps. Key Learnings Start using Rust and Leptos with VS Code to develop web applications using WebAssembly. Architect microservices with inventory, orders, and user modules for modular, scalable applications. Make servers that respond to user activity and are not blocked by other users. Use Tokio and Axum with dynamic routing and concurrency. Employ business logic with SQLX, transactions, and external API integration for real-world workflows. Protect your devices with JWT, OAuth2, Argon2 password hashing, HttpOnly cookies, and TLS encryption. Handle database state asynchronously, define Serde data models, and perform efficient CRUD operations. Utilize WebSockets, Leptos signals, and broadcast channels to enable real-time updates. Perform end-to-end testing with Playwright, integration tests, and automated CI pipelines for reliability. Put microservices and the frontend into containers using Docker, and use Kubernetes to orchestrate them so they can be deployed without any downtime. Table of Content Setting up Rust & Leptos Environment Designing Modern Architecture Building Application Server Database Integration and State Management Modern Interactions with REST, GraphQL, and OAuth Front-end Development with Leptos and WebAssembly Real-time Interactions using Websocket Modern Security, Performance, and Cloud Strategies Cloud-native Releases and Continuous Delivery

Rust Web Programming


Rust Web Programming

Author: Maxwell Flitton

language: en

Publisher: Packt Publishing Ltd

Release Date: 2021-02-26


DOWNLOAD





Adopt the Rust programming language by learning how to build fully functional web applications and services and address challenges relating to safety and performance Key FeaturesBuild scalable web applications in Rust using popular frameworks such as Actix, Rocket, and WarpCreate front-end components that can be injected into multiple viewsDevelop data models in Rust to interact with the databaseBook Description Are safety and high performance a big concern for you while developing web applications? While most programming languages have a safety or speed trade-off, Rust provides memory safety without using a garbage collector. This means that with its low memory footprint, you can build high-performance and secure web apps with relative ease. This book will take you through each stage of the web development process, showing you how to combine Rust and modern web development principles to build supercharged web apps. You'll start with an introduction to Rust and understand how to avoid common pitfalls when migrating from traditional dynamic programming languages. The book will show you how to structure Rust code for a project that spans multiple pages and modules. Next, you'll explore the Actix Web framework and get a basic web server up and running. As you advance, you'll learn how to process JSON requests and display data from the web app via HTML, CSS, and JavaScript. You'll also be able to persist data and create RESTful services in Rust. Later, you'll build an automated deployment process for the app on an AWS EC2 instance and Docker Hub. Finally, you'll play around with some popular web frameworks in Rust and compare them. By the end of this Rust book, you'll be able to confidently create scalable and fast web applications with Rust. What you will learnStructure scalable web apps in Rust in Rocket, Actix Web, and WarpApply data persistence for your web apps using PostgreSQLBuild login, JWT, and config modules for your web appsServe HTML, CSS, and JavaScript from the Actix Web serverBuild unit tests and functional API tests in Postman and NewmanDeploy the Rust app with NGINX and Docker onto an AWS EC2 instanceWho this book is for This book on web programming with Rust is for web developers who have programmed in traditional languages such as Python, Ruby, JavaScript, and Java and are looking to develop high-performance web applications with Rust. Although no prior experience with Rust is necessary, a solid understanding of web development principles and basic knowledge of HTML, CSS, and JavaScript are required if you want to get the most out of this book.

The Rust Programming Language (Covers Rust 2018)


The Rust Programming Language (Covers Rust 2018)

Author: Steve Klabnik

language: en

Publisher: No Starch Press

Release Date: 2019-08-12


DOWNLOAD





The official book on the Rust programming language, written by the Rust development team at the Mozilla Foundation, fully updated for Rust 2018. The Rust Programming Language is the official book on Rust: an open source systems programming language that helps you write faster, more reliable software. Rust offers control over low-level details (such as memory usage) in combination with high-level ergonomics, eliminating the hassle traditionally associated with low-level languages. The authors of The Rust Programming Language, members of the Rust Core Team, share their knowledge and experience to show you how to take full advantage of Rust's features--from installation to creating robust and scalable programs. You'll begin with basics like creating functions, choosing data types, and binding variables and then move on to more advanced concepts, such as: Ownership and borrowing, lifetimes, and traits Using Rust's memory safety guarantees to build fast, safe programs Testing, error handling, and effective refactoring Generics, smart pointers, multithreading, trait objects, and advanced pattern matching Using Cargo, Rust's built-in package manager, to build, test, and document your code and manage dependencies How best to use Rust's advanced compiler with compiler-led programming techniques You'll find plenty of code examples throughout the book, as well as three chapters dedicated to building complete projects to test your learning: a number guessing game, a Rust implementation of a command line tool, and a multithreaded server. New to this edition: An extended section on Rust macros, an expanded chapter on modules, and appendixes on Rust development tools and editions.