Rust for JavaScript/TypeScript Developers


Course Number: RUST-114
Duration: 5 days (32.5 hours)
Format: Live, hands-on

Rust Training for JavaScript and Typscript Developers Overview

This Rust training course teaches JavaScript and TypeScript Developers how to write high-performance and secure systems-level software using Rust programming. Attendees learn how to seamlessly transition from JavaScript/TypeScript to Rust, implementing its safety and performance for building next-generation web and server applications.

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 Rust philosophy
  • Set up and navigate the Rust environment
  • Explore Rust within the context of JavaScript/TypeScript
  • Understand basic Rust syntax and semantics
  • Implement control flow and logic
  • Understand ownership and borrowing concepts
  • Use tuples, enums, structs, and vectors
  • Work with pattern matching
  • Understand Rust’s concurrency model
  • Connect a Rust application to a database
  • Build a client-side WebAssembly app with Leptos
  • Build a web API with Actix

Prerequisites

  • Proficiency in Python programming
  • Basic understanding of programming concepts such as variables, expressions, functions, and control flow

Outline

Expand All | Collapse All

Introduction
What is Rust?
  • Rust’s Philosophy and Goals
  • History and motivation
  • Rust vs JavaScript
  • Rust vs TypeScript
  • Rust Community
  • The Rust Playground
Install Rust
  • Script
  • macOS Homebrew
  • Platform Installers
Rust Editors
  • VSCode with Extensions
  • Rust Rover
  • Debug Rust in VSCode
  • GitHub Copilot
Hello World
  • Create a new Project
  • Main Function
  • Print to the Console
  • Comments
Cargo
  • What is Cargo?
  • How does Cargo compare to Pip and Conda?
  • Rust Crates compared to Python Packages
  • Run Command
  • Build Command
  • Build Release Command
  • Install Third-Party Crates
Rust and JavaScript Differences
  • Static Typing vs Dynamic Typing
  • Strong Typing vs Loose Typing
  • Memory Management
  • Error Handling
  • Sequence, Selection, and Iteration
  • Structs vs Classes & Object Literals
  • Traits vs Duck-Typing
  • Concurrency
Rust and TypeScript Differences
  • Structural Typing
  • Memory Management
  • Error Handling
  • Sequence, Selection, and Iteration
  • Structs vs Classes & Object Literals
  • Traits vs Interfaces
  • Generics
  • Concurrency
Scalar Types and Data
  • Rust Types vs Python Type
  • Constants
  • Immutable Variables
  • Mutable Variables
Code Logic
  • If Statement
  • Loop with Break
  • While Loop
Functions
  • Define a Function
  • Call a Function
  • Parameter Types
  • Return Types
  • Closure Functions
Modules
  • Import Modules from Standard Library
  • Import Modules from Third-Party Crates
  • Define Custom Modules
  • Import Custom Modules
Built-In Macros
  • print! and println!
  • format!
  • vec!
  • include_str! and include_bytes!
  • cfg! and env!
  • panic!
Memory Management
  • Problems with Manual Management
  • Problems with Garbage Collection
  • Ownership & Borrowing
  • Rust vs Python
  • References
  • Lifetimes
Strings
  • String Slices
  • String Objects
  • Convert Between Slices and Strings
  • Parse Number from String
  • Trim String
  • Print Strings with Interpolation
Tuples
  • What is a Tuple?
  • Heterogeneous Elements
  • Access Elements
  • Destructuring
  • Immutable
Enums
  • What is an Enum?
  • Define an Enum
  • Using Enums
  • Enum Variants
  • Enum Methods
  • Enums and Pattern Matching
  • Result Enum
  • Option Enum
  • Enums vs Structs
Structs
  • What is a Struct?
  • Create Instance
  • Field Init Shorthand
  • Struct Update Syntax
  • Tuple Structs
  • Unit-Like Structs
  • Ownership of Struct Data
  • Function Implementation
  • Associated Functions
  • Stuct Methods
  • Constructor Pattern
Vectors
  • What is a Vector?
  • Create a Vector
  • Add and Remove Elements
  • Access Elements
  • Iterate over Elements
  • Slicing, Length, and Capacity
  • Common Vector Operations
  • Understand Memory Management
  • Ownership and Borrowing Rules
Collections and Iterators
  • Vectors, arrays, and slices
  • HashMaps and hash sets
  • Iteration and iterators
Traits
  • What is a trait?
  • How does a trait related to traditional OOP interfaces?
  • Defining a trait
  • Implementing a trait
  • Default implementations
  • Traits as parameters
  • Traits as return types
  • Traits as bounds
Generics
  • What is a generic?
  • How does a generic related to traditional OOP generics?
  • Defining a generic
  • Implementing a generic
  • Generic bounds
  • Multiple generic types
  • Where clauses
Pattern Matching
  • What is Pattern Matching?
  • Match Statement
  • If Let Statement
  • While Let Statement
  • Destructuring Stucts and Tuples
  • Pattern Matching with Enums
  • Pattern Matching with Functions
  • Pattern Matching and Ownership
  • Refutability and Irrefutability
Concurrent Programming
  • What is Concurrent Programming?
  • Using Multiple Threads
  • Mutex, RwLock, and Arc
  • Message Passing with Channels
  • Sync and Send Traits
  • Futures and Async/Await
Database Programming
  • What is a Database?
  • Connect to Postgresql
  • Query data from the database
  • Modify data in the database
Web Assembly with Leptos
  • What is Web Assembly?
  • What is Leptos?
  • How does Leptos compare to React, Angular, and Blazor?
  • Create a Leptos Project
  • Connect it to an Active Web Api
  • Create a Component
  • Pass Data to a Component
  • Emit Events from a Component
  • Work with Signals
  • Render a Collection of Data
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
  • Map HTTP Routes to Rust Functions
  • Working with Extractors
  • Using Handlers
  • Connect to a Database
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.

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