Skip to content Skip to content
Vladimir Chavkov

Rust Web Development with Actix & Axum Training

Build production-grade web services in Rust with this hands-on 3-day training. Learn both Actix Web and Axum frameworks side by side, covering request handling, middleware, authentication, database integration with SQLx, and deployment strategies. By the end, you will have built and deployed a complete REST API backed by PostgreSQL.

Duration3 days (24 hours)
LevelIntermediate
DeliveryIn-person, Live online, Hybrid
CertificationN/A
  • Rust developers building backend web services
  • Backend engineers evaluating Rust for API development
  • Teams migrating from Node.js, Go, or Python web frameworks
  • Developers building microservices with strict performance requirements
  • Full-stack developers adding Rust to their backend toolkit

After completing this training, participants will be able to:

  • Build REST APIs with both Actix Web and Axum
  • Implement middleware for logging, CORS, and authentication
  • Integrate PostgreSQL using SQLx with compile-time query checking
  • Handle JSON serialization and deserialization with serde
  • Write integration tests for web endpoints
  • Deploy Rust web services with Docker

Day 1: Foundations of Rust Web Development

Section titled “Day 1: Foundations of Rust Web Development”

Module 1: Web Frameworks Overview

  • Actix Web vs Axum architecture and trade-offs
  • The tower ecosystem and service abstraction
  • Project setup with cargo and workspace layout
  • Hands-on: Scaffold an Actix Web and Axum project side by side

Module 2: Request Handling and Routing

  • Route definition and path parameters
  • Query parameters and request body extraction
  • JSON request/response with serde
  • Hands-on: Build CRUD endpoints for a resource

Module 3: Application State and Configuration

  • Shared state with Arc and App data
  • Configuration management with config crate
  • Environment-specific settings
  • Hands-on: Add configuration and state management to your API

Module 4: Error Handling in Web Services

  • Custom error types and error responses
  • Mapping domain errors to HTTP status codes
  • Consistent error response format
  • Hands-on: Implement a unified error handling layer

Day 2: Database Integration and Middleware

Section titled “Day 2: Database Integration and Middleware”

Module 5: Database Integration with SQLx

  • Connection pools and async database access
  • Compile-time query checking with sqlx::query!
  • Migrations with sqlx-cli
  • Hands-on: Connect your API to PostgreSQL

Module 6: Data Modeling and Validation

  • Request validation with validator crate
  • Database models vs API models
  • Pagination, filtering, and sorting
  • Hands-on: Add validation and pagination to endpoints

Module 7: Middleware and Extractors

  • Middleware in Actix Web (Transform trait)
  • Middleware in Axum (tower layers)
  • Request logging, CORS, and rate limiting
  • Hands-on: Add logging, CORS, and custom middleware

Module 8: Authentication and Authorization

  • JWT token generation and validation with jsonwebtoken
  • Password hashing with argon2
  • Role-based access control
  • Hands-on: Add JWT authentication to your API

Day 3: Testing, Performance, and Deployment

Section titled “Day 3: Testing, Performance, and Deployment”

Module 9: Testing Web Services

  • Unit testing handlers and services
  • Integration testing with test servers
  • Database testing with test transactions
  • Hands-on: Write a comprehensive test suite for your API

Module 10: API Documentation

  • OpenAPI specification with utoipa
  • Swagger UI integration
  • API versioning strategies
  • Hands-on: Generate and serve API documentation

Module 11: Performance and Observability

  • Benchmarking with criterion and wrk
  • Tracing integration for structured logging
  • Metrics with prometheus crate
  • Hands-on: Add tracing and metrics to your service

Module 12: Containerization and Deployment

  • Multi-stage Docker builds for Rust
  • Optimizing binary size and build time
  • Health checks and graceful shutdown
  • Hands-on: Containerize and deploy your API
  • Completion of Rust Fundamentals or equivalent experience
  • Understanding of ownership, borrowing, and async/await basics
  • Familiarity with HTTP and REST API concepts
  • Basic SQL and database knowledge
FormatDescription
In-PersonOn-site at your company’s location, hands-on with direct interaction
Live OnlineInteractive virtual sessions with screen sharing and real-time labs
HybridCombination of on-site and remote sessions, flexible scheduling

All formats include hands-on labs, course materials, and post-training support.