CyberCode Academy

Course 19 - Ultimate Rust Crash Course | Episode 1: Rust Programming Foundations: From Cargo Tooling to Core Syntax and Modules


Listen Later

In this lesson, you’ll learn about:
  • The Rust Ecosystem and Tooling:
    • Using Cargo as Rust’s package manager, build system, and documentation tool.
    • Creating projects with cargo new, managing dependencies in Cargo.toml, and running code with cargo run.
    • Understanding the difference between debug builds and optimized release builds.
  • Variables and Constants:
    • Declaring variables with let in a strongly typed language with type inference.
    • Rust’s default immutability model and using mut for mutable values.
    • Defining constants (const) with explicit types and compile-time evaluation.
  • Scope and Shadowing:
    • How variables are scoped to blocks and automatically dropped when out of scope.
    • Using shadowing to redefine variables, including changing their type or mutability.
  • Memory Safety Guarantees:
    • Rust’s compile-time enforcement of memory safety.
    • Prevention of uninitialized variable usage and undefined behavior without relying on a garbage collector.
  • Functions and Macros:
    • Defining functions with fn and snake_case naming conventions.
    • Returning values using tail expressions without a semicolon.
    • Distinguishing between functions and macros (e.g., println!).
  • The Module System and Code Organization:
    • Structuring projects with main.rs for binaries and lib.rs for libraries.
    • Managing visibility with private-by-default items and the pub keyword.
    • Bringing items into scope with use and integrating external crates.
  • Hands-On Practice:
    • Reinforcing concepts through guided exercises, including building a command-line program and writing functions to calculate geometric areas and volumes.


You can listen and download our episodes for free on more than 10 different platforms:
https://linktr.ee/cybercode_academy
...more
View all episodesView all episodes
Download on the App Store

CyberCode AcademyBy CyberCode Academy