Rust is a fairly new programming language with the goal of being a safe systems programming language. “Safe” means code generated by Rust is free of memory access and data race vulnerabilities. System programming language means that Rust programs are fast and able to use platform resources.
This 5-part video series entitled Rust Models by Dr. James Fawcett, describes different conceptual models that underlie the Rust programming language. Discussion with exemplars is used to illustrate how the models describe aspects of the language for effective use. In this series, five core fundamental models are presented:
- Type Safety
- Object Model
- Code Structure
Discusses the Rust Language Ownership model which uses a type safety policy for avoiding undefined program behavior. The Rust type system ensures memory safety and prevents data races in multi-thread programs. The language rules for program variable (data) mutation, and the differences between value copies and moves is discussed in detail. Variable data is, by default, immutable. Variables must be annotated with the “mut” keyword in order to be modified.