<<Download>> Download Microsoft Word Course Outline Icon Word Version Download PDF Course Outline Icon PDF Version

Rust for JavaScript and TypeScript Programmers

Class Duration

35 hours of live training delivered over 5-10 days to accommodate your scheduling needs.

Student Prerequisites

  • Strong working proficiency in JavaScript or TypeScript
  • Comfort with Node.js, npm/pnpm, and modern bundlers
  • Familiarity with TypeScript's structural type system is helpful

Target Audience

JavaScript and TypeScript engineers adding Rust to their toolkit — for performance-critical Node services, edge runtimes, WebAssembly modules, CLIs, full-stack Rust web applications, or memory-safe replacements for legacy components. Particularly relevant for full-stack teams that want a single language story across browser (Leptos + WASM) and server (Actix-web).

Description

This course gives experienced JavaScript and TypeScript developers a structured pathway to production Rust on the 2024 edition (Rust 1.85 introduced the edition; 1.95+ recommended for the current toolchain). Every concept is introduced in contrast with the JS/TS equivalent: ownership and borrowing vs. the V8 GC, traits vs. interfaces and duck typing, structs and enums vs. object literals and discriminated unions, async/await on Tokio vs. event loops and Promises, monomorphized generics vs. TypeScript's structural generics. The course closes with a real Rust full-stack story: a REST API on Actix-web 4 and a client-side WebAssembly app on Leptos 0.8 — built with AI assistance from Claude Code, Cursor, or GitHub Copilot the way senior engineers actually use them in 2026.

Learning Outcomes

  • Read and write idiomatic Rust on the 2024 edition with confidence in ownership, borrowing, and lifetimes.
  • Translate JavaScript and TypeScript idioms to Rust and vice versa, knowing where each language is the right tool.
  • Build CLIs, library crates, and async services on Tokio.
  • Apply traits and generics where JS/TS developers reach for interfaces and duck typing.
  • Connect a Rust service to PostgreSQL with sqlx and ship a REST API on Actix-web 4.
  • Build a small client-side WebAssembly application with Leptos 0.8.
  • Use AI coding assistants effectively for Rust while letting the compiler, clippy, and tests catch what AI gets wrong.

Training Materials

All students receive comprehensive courseware covering all topics in the course. Courseware is distributed via GitHub in the form of documentation and extensive code samples. Students practice the topics covered through challenging hands-on lab exercises that build to a full-stack capstone with an Actix-web API and a Leptos WebAssembly client.

Software Requirements

A free GitHub account, the latest stable Rust toolchain installed via rustup (Rust 1.95+ on the 2024 edition), Node.js 22+, Visual Studio Code or another supported editor with the rust-analyzer extension, Docker for the local PostgreSQL instance used in the database lab, and an AI coding assistant of choice (GitHub Copilot, Cursor, or Claude Code). A cloud-based environment can be provided if local installation is restricted.

Training Topics

Introduction: Rust from a JS/TS Perspective
  • What Rust is and where it fits relative to JavaScript and TypeScript
  • Rust 2024 edition: what's new and why it matters
  • Rust vs. JS: type system, runtime, packaging, performance
  • Rust vs. TS: nominal vs. structural typing, exhaustive enums vs. discriminated unions
  • The Rust ecosystem and community
Toolchain and Editor Setup
  • Installing Rust with rustup
  • cargo vs. npm/pnpm/yarn: similarities and differences
  • VS Code, JetBrains RustRover, and Zed with rust-analyzer
  • AI assistants for Rust: Copilot, Cursor, and Claude Code
  • The Rust Playground for quick experimentation
Cargo and Crates
  • cargo new, cargo run, cargo build, cargo test
  • Cargo.toml and dependencies vs. package.json
  • Workspaces and cargo publish --workspace
  • Popular crates: serde, tokio, reqwest, sqlx, anyhow, thiserror, tracing
Rust vs. JS/TS: A Working Map
  • Static typing vs. dynamic typing; nominal vs. structural typing
  • Memory management: ownership vs. GC
  • Errors: Result/Option vs. exceptions and error union types
  • Iteration: iterators vs. generators and async iterators
  • Structs and enums vs. object literals and discriminated unions
  • Traits vs. interfaces and duck typing
  • Generics: monomorphization vs. TypeScript generics erased at runtime
  • Concurrency: Tokio + async/await vs. event loop + Promises
Scalar Types, Control Flow, and Functions
  • Integers, floats, booleans, characters
  • Constants, statics, and const fn
  • if/else as expressions, loop, while, for
  • 2024-edition let-chains in if and while
  • Functions, closures, and capture modes
Modules and Built-In Macros
  • Module hierarchy with mod and use
  • Importing from the standard library and crates.io
  • Visibility and re-exports
  • print!, println!, eprintln!, format!, dbg!, vec!, assert!
Memory Management and Ownership
  • Ownership, moves, and copies
  • Borrowing: &T and &mut T
  • Lifetimes and the borrow checker
  • Box, Rc, Arc, and when each is appropriate
  • Common JS/TS developer pitfalls
Strings, Tuples, Enums, Structs, Collections
  • String vs. &str
  • Tuples and tuple structs
  • Enums with associated data, Option<T>, Result<T, E>
  • Structs, methods, associated functions, constructors
  • Vec, HashMap, HashSet, BTreeMap/BTreeSet
  • Iterators and combinators (map, filter, fold, try_fold)
Pattern Matching
  • match and exhaustiveness
  • if let, while let, and 2024 let-chains
  • Destructuring nested data
  • Guards, bindings, and @ patterns
Traits and Generics
  • Defining and implementing traits
  • Default methods and trait objects (dyn Trait)
  • Generics, bounds, and where clauses
  • Static dispatch (monomorphization) vs. dynamic dispatch
  • Async fn in traits
Async/Await with Tokio
  • The async/await mental model from a Promise/event-loop perspective
  • Tokio runtime fundamentals
  • 2024-edition async closures
  • tokio::select!, JoinSet, structured cancellation
  • HTTP with reqwest, JSON with serde
Concurrent Programming
  • Threads vs. async tasks
  • Send, Sync, and the data-race story
  • Arc, Mutex, RwLock, channels
  • A short tour of rayon for data parallelism
Database Programming with sqlx
  • Connecting to PostgreSQL with sqlx
  • Query the database with compile-time-checked SQL
  • Modify data and handle transactions
  • Error handling at the database boundary
Web APIs with Actix-web 4
  • Actix-web 4: actors, the runtime, and where it sits relative to Express/Fastify/NestJS
  • Creating a project, routing, and request handlers
  • Extractors, JSON, and form handling
  • Middleware: logging, sessions, error handling
  • Connecting to the database
Client-Side Rust with Leptos 0.8
  • WebAssembly and what changed since the early days
  • Leptos 0.8 fine-grained reactivity vs. React's virtual DOM
  • Components, signals, and effects
  • Server functions and the islands router
  • Rendering modes: CSR, SSR, SSR with hydration
  • Calling the Actix-web API from Leptos
AI-Assisted Rust Development for JS/TS Engineers
  • The 2026 AI-coding-tool landscape and how full-stack JS/TS developers use it for Rust
  • Prompts that work well for Rust ownership, lifetimes, and trait design
  • Letting the compiler, clippy, and tests catch what AI gets wrong
  • Reviewing AI-generated unsafe, unwrap, and reflexive Arc<Mutex<T>>
  • Agentic Rust workflows: AI-assisted refactors, code review, and CI
Capstone
  • Build a small full-stack application: an Actix-web 4 API backed by PostgreSQL and a Leptos 0.8 WebAssembly client — written with AI assistance and validated by the compiler, clippy, tests, and a Lighthouse run on the WASM bundle
  • Course wrap-up and recommended next courses
<<Download>> Download Microsoft Word Course Outline Icon Word Version Download PDF Course Outline Icon PDF Version