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.
- Getting going: install,
om run,om build, how a program is laid out - A first project: grade report: a whole small program before the details
- Common concepts: variables, types, functions, comments, control flow
- Ownership: how Om manages memory without a garbage collector
- Structs: grouping data, methods
- Enums and pattern matching: types with variants,
match,if let - Handling errors:
Option,Result,?and panics - Collections:
Vec,String,strandBox - Generics and traits: writing code once for many types
- Om's extras: default and named arguments,
|>, interpolation,defer - 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.