const

  • Rust will not use type inference.
  • Values that do not change.
  • more popular.
  • Shadowing is not allowed. Shadowing
const my_number = 8; // 🛑 Will not work there is no type!! also will give a warning; should have an uppercase name.
const MY_NUMBER :i8 = 8; // ✔️

static

  • Rust will not use type inference.
  • Values that do not change.
  • Has a fixed memory location.
  • Can act as a global var.
  • Shadowing is not allowed. Shadowing
static SEASONS: [&str; 4] = ["Spring", "Summer", "Fall", "Winter"];

let

  • used to introduce a new set of variables into the current scope, as given by a pattern.
  • immutable by default.
  • use mut to make it mutable.