The Om Book

A tutorial for Om, from your first program to ownership, traits and generics. It assumes you've programmed before in some language, but not that you know Rust. Each chapter is short and every complete program in it compiles and runs with the current compiler.

  1. Getting going: install, om run, om build, how a program is laid out
  2. A first project: grade report: a whole small program before the details
  3. Common concepts: variables, types, functions, comments, control flow
  4. Ownership: how Om manages memory without a garbage collector
  5. Structs: grouping data, methods
  6. Enums and pattern matching: types with variants, match, if let
  7. Handling errors: Option, Result, ? and panics
  8. Collections: Vec, String, str and Box
  9. Generics and traits: writing code once for many types
  10. Om's extras: default and named arguments, |>, interpolation, defer
  11. What's next: what Om can't do yet, and where it's going

Prefer to learn from code? Om by Example covers the same ground in short programs. Back to Learn Om.