Rust readers already look for ownership, enums, traits, Result, modules, pattern matching, and explicit unsafe. Musi shares the habit of making branches and contracts visible, but has its own split: data for variants, records for fields, classes/instances for behavior, effects for requested outside work, and foreign declarations for native edges.
Use this guide as a translation journal for Rust code. Start with the familiar habit, then ask which Musi construct owns the same promise. A page is successful when it tells you which old instinct to keep and which old shortcut to drop.
Start from the habit that hurts
- Values, Functions, and Final Expressions - values habits get translated once, then the Musi Book owns the details.
- Mutation - mutation habits get translated once, then the Musi Book owns the details.
- Records, Structs, and Field Updates - records habits get translated once, then the Musi Book owns the details.
- Enums, Data, and Pattern Matching - patterns habits get translated once, then the Musi Book owns the details.
- Traits, Classes, Instances, and Laws - behavior contracts stop hiding in object habits.
- Generics and Type Constructors - generics habits get translated once, then the Musi Book owns the details.
- Results, I/O, and Effects - outside work becomes a named request.
- Modules, Packages, and Visibility - package boundaries replace compatibility-era habits.
- Unsafe and FFI - native edges stay narrow enough to audit.
- Testing and Tooling - testing habits get translated once, then the Musi Book owns the details.
Habits that still help
- Keep the Rust habit of asking which type carries the invariant.
- Drop syntax expectations around impl, lifetimes, and match punctuation; read the Musi contract instead.
- Keep examples tied to ordinary work: receipts, routes, files, animals, people, rooms, and services.
First false friend
Musi class is closest to a Rust trait plus law text; instances play the role of implementations for behavior. If you need a person, car, invoice, or package, start with records or data. If you need any type that can compare, show, encode, or step, use a class with instances.
When to switch to the Musi Book
Stay in this guide while a Rust habit is getting in the way. Switch to Values and let, Records, Patterns, Generics, Classes, and Effects when you need the source-of-truth rule.