Week 7 – Go and Rust Fundamentals

Objectives

  • Compare systems programming approaches in Go and Rust.
  • Build confidence with language tooling and compilation.
  • Implement small performance-conscious utilities.
  • Manage dependencies using Go modules and Cargo.

Topics

  • Go basics: packages, structs, interfaces, concurrency intro.
  • Rust basics: ownership, borrowing, structs, enums, pattern matching.
  • Toolchains (go, cargo) and project structure.
  • Error handling idioms in both languages.
  • Tradeoffs and use cases.
  • Go modules: go.mod, go.sum, and the module proxy.
  • Cargo: Cargo.toml, Cargo.lock, crates.io, and feature flags.
  • Semantic versioning and dependency pinning in both ecosystems.

Hands-On Activities

  • Build one CLI utility in Go.
  • Build one CLI utility in Rust.
  • Compare implementation style and performance behavior.
  • Add and update external dependencies in both projects.
  • Inspect and verify lock files for reproducibility.

Deliverables

  • Two small command-line tools (one per language).
  • Reflection notes on language and ecosystem tradeoffs.

Assessment

  • Live coding walkthrough and architecture discussion.