Rust Programming

Target Audience

Prerequisites

Objectives

Course Format

Syllabus

  1. Rust
    • Installing Rust
    • Why use Rust?
    • Configuring IDE or editor
    • Cargo - the package and dependency manager of Rust
    • Hello World
    • Primitives - basic (scalar) types in Rust
    • Inferred types
    • Numbers, characters, strings
    • String slices
    • Variables, mutability
    • Scope of variables
    • Control flow (if, for, loop)
    • Understanding memory safety, ownership and borrowing
    • They type system of Rust
    • Error handling
    • Special types: Option, Result
    • Pattern matching (match, Ok, Err, Some, None)
    • Compound types (Vectors, Hashes, Structs, Tuples, etc.)
    • Vectors
    • Structs
    • Enums
    • Functions
    • Creating libraries in Rust
    • Generics and Traits
    • Collections
    • Variable lifetime
    • Smart pointers
    • Dependency management
    • Backward compability
    • Testing your code
    • Distributing executables for multiple platforms (CI/CD, cross compilation)
  2. Regular Expressions in Rust
    • The regex flavor of Rust
    • Matching strings
    • Capturing the match
    • Matching repetitions
    • Replacing strings
    • Compiling regular expressions only once
  3. Reusable Rust library
    • Use a Rust crate from Python
    • Use a Rust crate from C
  4. Relevant Computer Science topics
    • Data embedded in the source code
    • What is the Stack, Heap
    • Pointers
    • Memory management, memory safety
    • Manual memory management with allocation and freeing
    • Reference counting
    • Garbage collection
    • Compiled vs. Interpreted languages
    • Statically type vs. dynamically typed languages
    • Loosely typed vs strongly typed
  5. Functional programming in Rust
    • Iterators
    • Closures
    • Function pointers
  6. Crates
    • Module system
    • Creating an executable (binary) crate
    • Creating a library crate
    • Packaging crates
    • Distributing crates
    • One crate per repo
    • Multiple crates per repo (monorepo)
  7. Fearless Concurrency with threading
    • Run code simultaneously
    • Passing data back-and-force between threads
    • Sharing data between threads
    • Avoiding dead-locks and other nastiness
  8. Concurrency with async programming
  9. The liquid Templating system
  10. CLI - Command line applications in Rust
  11. Building API in Rust
  12. Handling well-known file formats
    • JSON
    • YAML
    • CSV
  13. Macros
  14. Unsafe Rust and FFI - Foreign Function Interface

Contact

Contact: Gabor Szabo gabor@hostlocal.com
Phone: +972-54-4624648