Web APIs with Rust and ActixWeb


Course Number: RUST-118
Duration: 3 days (19.5 hours)
Format: Live, hands-on

Rust and ActixWeb Training Overview

This advanced Rust training course teaches attendees how to build REST APIs with Rust and ActixWeb. Participants learn how to create routes, handlers, and extractors and how to connect to a database and perform CRUD operations.

Location and Pricing

Accelebrate offers instructor-led enterprise training for groups of 3 or more online or at your site. Most Accelebrate classes can be flexibly scheduled for your group, including delivery in half-day segments across a week or set of weeks. To receive a customized proposal and price quote for private corporate training on-site or online, please contact us.

In addition, some courses are available as live, instructor-led training from one of our partners.

Objectives

  • Understand the principles of building a REST API
  • Create web APIs with Rust and Actix
  • Connect a REST API to a database (PostgreSQL or SQL Server)
  • Configure routes
  • Explore extractors, handlers, and middleware
  • Publish and host a REST API

Prerequisites

This Rust course assumes prior experience with Rust. Experience with the SQL language and PostgreSQL or SQL Server is beneficial, but not required.

Outline

Expand All | Collapse All

Introduction
REST Overview
  • What is REST?
  • What is a REST API?
  • What is a REST Client?
  • HTTP Methods and Resource Operations
  • URLs, Query Strings, and Path Parameters
  • HTTP Status Codes
  • HTTP Headers and Body
  • CURL and Postman
Web APIs with Actix
  • What is a Web API?
  • What is Actix?
  • How does it compare to Express, Flask, and ASP.NET MVC?
  • Create an Actix Project
  • Run and Debug Actix Applications with VS Code
Routing
  • What is Routing?
  • Map HTTP Routes to Rust Functions
  • Route Parameters
  • Wire up Routes in an ActixWeb Application
Extractors
  • What is an Extractor?
  • Path Extractor
  • Query String Extractor
  • JSON Extractor
  • URL-Encoded Form Extractor
  • Other Extractors
  • Custom Extractors
Request Handlers
  • What is a Request Handler?
  • Stages of Handling a Request
  • Responder Trait
  • Respond with a Custom Type
  • Streaming Response Body
  • Different Response Types
Middleware
  • What is Middleware?
  • Request/Response Pipeline
  • Logging
  • User Sessions
  • Error Handling
  • Custom Middleware
Static Files
Database Programming
  • What is a Database?
  • Connect to a Database
  • Query data from the database
  • Modify data in the database
Testing
  • Integration Testing
  • Stream Response Testing
  • Unit Testing Extractors
  • Unit Testing Middleware
  • Unit Testing Responders
Deployment
Build a Release Version
Public the Release Version
Hosting Considerations
Dockerize the Application
Conclusion

Training Materials

All students receive comprehensive courseware covering all topics in the course. Courseware is distributed via GitHub through documentation and extensive code samples. Students practice the topics covered through hands-on lab exercises.

Software Requirements

  • A free, personal GitHub account to access the courseware
  • Permission to install Rust and Visual Studio Code on their computers
  • Permission to install Rust Crates and Visual Studio Extensions

If students cannot configure a local environment, a cloud-based environment can be provided.



Learn faster

Our live, instructor-led lectures are far more effective than pre-recorded classes

Satisfaction guarantee

If your team is not 100% satisfied with your training, we do what's necessary to make it right

Learn online from anywhere

Whether you are at home or in the office, we make learning interactive and engaging

Multiple Payment Options

We accept check, ACH/EFT, major credit cards, and most purchase orders



Recent Training Locations

Alabama

Birmingham

Huntsville

Montgomery

Alaska

Anchorage

Arizona

Phoenix

Tucson

Arkansas

Fayetteville

Little Rock

California

Los Angeles

Oakland

Orange County

Sacramento

San Diego

San Francisco

San Jose

Colorado

Boulder

Colorado Springs

Denver

Connecticut

Hartford

DC

Washington

Florida

Fort Lauderdale

Jacksonville

Miami

Orlando

Tampa

Georgia

Atlanta

Augusta

Savannah

Hawaii

Honolulu

Idaho

Boise

Illinois

Chicago

Indiana

Indianapolis

Iowa

Cedar Rapids

Des Moines

Kansas

Wichita

Kentucky

Lexington

Louisville

Louisiana

New Orleans

Maine

Portland

Maryland

Annapolis

Baltimore

Frederick

Hagerstown

Massachusetts

Boston

Cambridge

Springfield

Michigan

Ann Arbor

Detroit

Grand Rapids

Minnesota

Minneapolis

Saint Paul

Mississippi

Jackson

Missouri

Kansas City

St. Louis

Nebraska

Lincoln

Omaha

Nevada

Las Vegas

Reno

New Jersey

Princeton

New Mexico

Albuquerque

New York

Albany

Buffalo

New York City

White Plains

North Carolina

Charlotte

Durham

Raleigh

Ohio

Akron

Canton

Cincinnati

Cleveland

Columbus

Dayton

Oklahoma

Oklahoma City

Tulsa

Oregon

Portland

Pennsylvania

Philadelphia

Pittsburgh

Rhode Island

Providence

South Carolina

Charleston

Columbia

Greenville

Tennessee

Knoxville

Memphis

Nashville

Texas

Austin

Dallas

El Paso

Houston

San Antonio

Utah

Salt Lake City

Virginia

Alexandria

Arlington

Norfolk

Richmond

Washington

Seattle

Tacoma

West Virginia

Charleston

Wisconsin

Madison

Milwaukee

Alberta

Calgary

Edmonton

British Columbia

Vancouver

Manitoba

Winnipeg

Nova Scotia

Halifax

Ontario

Ottawa

Toronto

Quebec

Montreal

Puerto Rico

San Juan