Rust is the language trusted inside Firefox, the Linux kernel, and the cloud systems of Amazon, Microsoft, and Google — fast like C, with a compiler that proves whole families of crashes absent before your program ever runs. This book teaches it to complete beginners. One-time $4.99 — and you keep it forever.
Rust Programming: Fundamentals is a plain-English first course in Rust for people who have never programmed. No experience needed, no expensive software: the only tool is the free Rust toolchain and its project tool, Cargo. You will compile and run real native programs from the first chapter — variables that are immutable unless you say mut out loud, exactly-sized types, decisions and loops, functions whose signatures are honest contracts — and then the heart of the language: ownership and borrowing, taught with a genuine borrow-checker refusal (error E0502) printed verbatim from the real compiler and read calmly, the way this series reads every error. Strings in both their forms, structs with behavior, enums with exhaustive matching and Option instead of null, and a complete Personal Library program assembled from pieces of every earlier chapter. Every program printed in this book was compiled and run for real with Cargo before it went on the page — thirteen listings, standard library only, nothing to download — including the one program that fails to compile on purpose, whose real error is the lesson.
Inside (12 chapters, 73 pages, about 12,700 words, illustrated — one teaching diagram per chapter):
- What Rust Is — The Language That Checks Your Work Before It Runs: a compiled language producing fast native code with no garbage collector, whose compiler proves at compile time that the memory mistakes C and C++ are famous for cannot be in your program
- Your First Program — Cargo, Variables, and the Word mut: Cargo creating, building and running your project; variables immutable by default, mut said out loud when a value may change, shadowing, and const for facts fixed before the program starts
- Types — Small Boxes With Exact Sizes: the four scalar types, integer division dropping its fraction honestly, and conversions that happen only when you visibly type as
- Making Decisions — If Is an Expression: real bool conditions only, ladders whose first true branch wins, the whole ladder as the value of one immutable variable, and reading a line from the keyboard and turning it into a number
- Loops — Three Shapes of Again: loop until break (which can carry a value out with it), while while a test holds, and for once per item — with ranges in both their exclusive and inclusive forms
- Functions — Small Machines With Names: signatures as honest contracts of typed inputs and a typed output, statements versus expressions, and the one trailing semicolon that can break a function's promise
- Ownership — The Heart of Rust: the three ownership rules, when assignment copies and when it moves, clone asked for out loud and priced honestly, and how ownership travels into a function and back out as a return value
- Borrowing — Reading Over a Shoulder, Writing With Permission: shared borrows for many readers, one mutable borrow for one writer alone — and a real E0502 borrow-checker refusal, printed verbatim from the actual compiler and read calmly, line by line
- Strings — Owned Suitcases and Borrowed Windows: String, the owned growable text, versus &str, the borrowed view — growing, format!, slicing with its honest warning, and why a string's byte count and character count can differ
- Structs — Bundling Data, Then Behavior: named fields bundled into one owned type, impl blocks, methods that borrow with &self, and associated functions — the new constructor idiom
- Enums and Matching — Every Case, Handled: one-of-several variants, match that must be exhaustive or the program does not compile, and Option<T> — absence as two named cases you handle, which is why Rust has no null
- Your Personal Library, Assembled — and Where to Go Next: a complete menu-driven library program built from pieces of every earlier chapter around the one new tool it needs, the growable Vec — then the skills checklist and the honest road onward
Written in English (English edition). By Cosmo, published by Kaila's World. Instant download after checkout — the PDF is delivered automatically by the Digital Products app to your email. Personal-use license (see our Digital Rights & Licensing Policy). The companion volume, Rust Programming: The Advanced Course, picks up where this one stops.