The Rust Programming Language (Covers Rust 2018)

The Rust Programming Language (Covers Rust 2018)

  • Downloads:7480
  • Type:Epub+TxT+PDF+Mobi
  • Create Date:2022-01-12 08:51:03
  • Update Date:2025-09-07
  • Status:finish
  • Author:Steve Klabnik
  • ISBN:1718500440
  • Environment:PC/Android/iPhone/iPad/Kindle

Summary

The official book on the Rust programming language, written by the Rust development team at the Mozilla Foundation, fully updated for Rust 2018。

The Rust Programming Language is the official, definitive guide to Rust, a hugely popular, community-supported programming language。 This is the second edition of the improved version of the free online Rust book, so well-loved in the Rust community that it is simply referred to as "the Book"。
Programmers love Rust because it allows them to write powerful code efficiently, without the risk of crashes and errors common in languages like C and C++。 This book will show readers how to use Rust's robust type system to keep programs memory-safe and speedy, and make the most of the Cargo package manager that brings the pieces of a program together。 The reader will learn all about Rust's ownership rules, which lie at the heart of Rust's reliability and crash-resistant compiling。
The Rust Programming Language covers everything from basic concepts like variable bindings, control flow, functions, and error handling, to more advanced topics, such as crates, generics, concurrency, and the nitty gritty of Rust's type system。 With improved organization, hands-on features, and a more tutorial-oriented style, this version offers a vast improvement over the original。
The second edition also provides an entirely new chapter on macros and an expanded chapter on crates, two key aspects of Rust that make it so popular。 Readers will also find extra appendices on Rust development tools and Rust versions。

Download

Reviews

Praneeth Ranasinghe

First of all。 I always felt something off with every language i came to learn。I wondered maybe because i'm a slow learner or maybe something off with the languages i came across。 I'm happy to say this book solved that conundrum。 Not exactly praise to the book, but to the language。 This book is still a big part of that process。The way book had built it's modules and chapters are awesome。 One chapter introduces a new concept and among it's content there's another strange syntax (unavoidable as the First of all。 I always felt something off with every language i came to learn。I wondered maybe because i'm a slow learner or maybe something off with the languages i came across。 I'm happy to say this book solved that conundrum。 Not exactly praise to the book, but to the language。 This book is still a big part of that process。The way book had built it's modules and chapters are awesome。 One chapter introduces a new concept and among it's content there's another strange syntax (unavoidable as the languages goes) but gives you assurance "it will be covered soon" to keep the worrying at bay by justifying the promise。 And it keeps you interested inside a complex syntax of a low level language。Also author does explains the underlying mechanisms of many syntaxes so it deeply carves into the knowledge。 。。。more

Carl

Throughout the years I've read a few of books of "X the programming language": C, AWK, Java, C++, Scala, C#, Haskell to name a few。 The Rust book is one of the very best in this genre。 New concepts are clearly explained both with examples and the reason behind why it was designed this way。 I'm not Rust programmer (yet) but seems like just like in Haskell the compiler error messages will guide you。 The book does a good job of showcasing this style by first showing naive implementation (that won't Throughout the years I've read a few of books of "X the programming language": C, AWK, Java, C++, Scala, C#, Haskell to name a few。 The Rust book is one of the very best in this genre。 New concepts are clearly explained both with examples and the reason behind why it was designed this way。 I'm not Rust programmer (yet) but seems like just like in Haskell the compiler error messages will guide you。 The book does a good job of showcasing this style by first showing naive implementation (that won't compile) and then moving onto a working solution by following the compiler。 The two "project chapters" on building command line tool and a web server in particular are true gems。 Overall a great summary of an exciting language。 Highly recommended。 。。。more

irene

Excellent introduction to Rust, a joy to read。

Santiago Fraire Willemoës

Super complete book, opposite to other languages, you actually need to sit down and understand concepts。 Rust is a language that introduces a lot of novel ideas and thus it requires some work from the engineer。 This book gives you a nice toolset (I don't know if it will be enough in my journey), but I'm very happy with it。 Super complete book, opposite to other languages, you actually need to sit down and understand concepts。 Rust is a language that introduces a lot of novel ideas and thus it requires some work from the engineer。 This book gives you a nice toolset (I don't know if it will be enough in my journey), but I'm very happy with it。 。。。more

Farzin

[]

Francisco Grimm-Pitch

The book is good and to the point。 I think it's targeted at not so experienced programmers, which is good in general, but bored me in parts, still this was a great intro to the language and I was programming immediately after reading about 50% of it。 The book is good and to the point。 I think it's targeted at not so experienced programmers, which is good in general, but bored me in parts, still this was a great intro to the language and I was programming immediately after reading about 50% of it。 。。。more

Saurabh Jha

A great book for a great language。 Rust is not an easy language to learn。 It has concepts like ownership and borrowing, lifetimes, and boxes, that are either not present in other languages or are present in some non obvious way。 This book has done a wonderful job explaining the intricacies of Rust。 Having gone through this, I feel confident working on a Rust project on my own。The reason I gave it 4 stars and not 5 is because, like all other language books I have read, it felt like a slog towards A great book for a great language。 Rust is not an easy language to learn。 It has concepts like ownership and borrowing, lifetimes, and boxes, that are either not present in other languages or are present in some non obvious way。 This book has done a wonderful job explaining the intricacies of Rust。 Having gone through this, I feel confident working on a Rust project on my own。The reason I gave it 4 stars and not 5 is because, like all other language books I have read, it felt like a slog towards the end。 Nevertheless, I am glad I went through this book and I improved as a programmer having gone through it。 。。。more

Nikola Anicic

Excellent guide with examples how it was done without improvements and what was improved in the code later。 I liked bolding of the new lines added or changed in the code examples。It is extremely important before introducing something new to give an example how it will be without it and then what benefit introducing that new thing brings。 And this book does it in an excellent way, something similar as Scott Meyers did with his books about C++。 I love it!Recommendations。

Jann Flepp

I've heard good things about Rust and wanted to know what it is about。 This book seemed like the Rust Book since it is available for free online and many people contributed to it through its GitHub Repo。 I started reading online and switched to the paperback once I was convinced it is worth a read。After reading it back to back (except the last chapter), I think I have a good understanding of what Rust offers。 The book feels a bit like a reference, working through the features of Rust, but there I've heard good things about Rust and wanted to know what it is about。 This book seemed like the Rust Book since it is available for free online and many people contributed to it through its GitHub Repo。 I started reading online and switched to the paperback once I was convinced it is worth a read。After reading it back to back (except the last chapter), I think I have a good understanding of what Rust offers。 The book feels a bit like a reference, working through the features of Rust, but there are also chapters where small programs are written and explained step by step。 Still, overall I feel like the author wanted to cover as much as possible, leaving many small aspects explained but without examples。This makes it difficult to judge the book: Does it want to be a language reference or an introduction? Probably a bit of both, with a tendency to the former:- If you're looking for a book to get started with Rust right away, I would suggest reading the first few chapters only and then gradually read on while you're practicing。- If you're looking for a reference, this book is probably sufficient (although I can't tell how much hasn't been covered)。In comparison to the well-known K&R book, this book features fewer examples and details。 Given that Rust is a much more complex language than C, I think it wouldn't have been possible to go as far into the details (e。g。 I didn't find an operator precedence table) and provide as many examples。 Otherwise, it would have been a massive book。 But it does feel like they took some inspiration from K&R。For me, the writing style was very understandable and that is also the book's biggest strength。 It really really tries to get the reader to a point where he understands the concepts and doesn't slip into a snooty jargon-heavy style of writing as seen in other "language books"。 Only a very basic understanding of programming is required to get started, so it is beginner-friendly。Of course, these are just my opinions。 If you're unsure whether to start the book or not, just give it a try in the free online version。 。。。more

Garrett

This is a solid introduction to one of the most interesting programming languages of the 21st century。 The concepts are well explained, but the exposition around code examples was a but more verbose than my liking。 Overall some paragraphs are best skimmed over。 The chapters with projects were worth investing a bit more time into, especially for getting a feel for the std documentation and the crates ecosystem。A good book, not the best I've read but worth the time if you're interested in learning This is a solid introduction to one of the most interesting programming languages of the 21st century。 The concepts are well explained, but the exposition around code examples was a but more verbose than my liking。 Overall some paragraphs are best skimmed over。 The chapters with projects were worth investing a bit more time into, especially for getting a feel for the std documentation and the crates ecosystem。A good book, not the best I've read but worth the time if you're interested in learning Rust。 I definitely feel confident about starting my own project after reading this!Also pro move making it free online, kudos to the Rust core team for deciding to go that route。 。。。more

Bojan Vujanic

Just what I would expect from a book of this type。 Very well written with lots of useful snippets that help with grasping the concepts。

Utsob Roy

তো, আমি তো কোনোকালেই সিস্টেম প্রোগ্রামার না। ইউজার-ফেসিং জিনিসপত্র নিয়েই আমার কারবার। সিম্পলি মন চায় বলে এটা ওটা ঘেঁটে দেখি। আগে একবার রাস্ট অ্যাপ্রোচ করেছিলাম, তখন ভালো লাগেনাই। এই বইটা পড়ে বরং ভালো লেগেছে।অধুনাকালে জনপ্রিয় দুটো ল্যাঙ্গুয়েজ আমারও ভালো লেগেছে। গো- মিনিম্যালিস্ট অ্যাপ্রোচ আর কনকারেন্সির জন্য, ডার্ট-সিনট্যাক্সের জন্য।তো, রাস্ট ভালো লেগেছে কয়েকটা কারনে। ম্যাচ সিনট্যাক্স, সেফটি ফিচারস, ভালো কম্পাইলার, আর বিল্ড সিস্টেম। তাছাড়া গো-এর মত ওওপি-এর কম্পোজিশন-বেজড অ্যাপ্রোচ।বইটা রেক তো, আমি তো কোনোকালেই সিস্টেম প্রোগ্রামার না। ইউজার-ফেসিং জিনিসপত্র নিয়েই আমার কারবার। সিম্পলি মন চায় বলে এটা ওটা ঘেঁটে দেখি। আগে একবার রাস্ট অ্যাপ্রোচ করেছিলাম, তখন ভালো লাগেনাই। এই বইটা পড়ে বরং ভালো লেগেছে।অধুনাকালে জনপ্রিয় দুটো ল্যাঙ্গুয়েজ আমারও ভালো লেগেছে। গো- মিনিম্যালিস্ট অ্যাপ্রোচ আর কনকারেন্সির জন্য, ডার্ট-সিনট্যাক্সের জন্য।তো, রাস্ট ভালো লেগেছে কয়েকটা কারনে। ম্যাচ সিনট্যাক্স, সেফটি ফিচারস, ভালো কম্পাইলার, আর বিল্ড সিস্টেম। তাছাড়া গো-এর মত ওওপি-এর কম্পোজিশন-বেজড অ্যাপ্রোচ।বইটা রেকমেন্ডেড কেননা লেখা স্বচ্ছল, ভালোভাবে অনেককিছু এক্সপ্লেইন করা আছে। 。。。more

Alex

I picked this up to learn more about Traits after reading What's bad about Julia, but ended up reading the whole book because of the clear, Hadley Wickham style exposition。 I'm jealous that I won't get to use Rust much in my professional life (where R and Python rein) because it seems very nice。 I plan to read more Rust documentation to absorb more general programming language knowledge。 I picked this up to learn more about Traits after reading What's bad about Julia, but ended up reading the whole book because of the clear, Hadley Wickham style exposition。 I'm jealous that I won't get to use Rust much in my professional life (where R and Python rein) because it seems very nice。 I plan to read more Rust documentation to absorb more general programming language knowledge。 。。。more

Arun

I have been using rust at work comfortably before reading this book and knew everything talked about in the book either from trial and error or from reading blogs/open source code etc。 But completing this book is like a rite of passage for rustaceans so I decided to give it a shot。 If you are already doing s/w eng。 for a while, it doesn't shock you with grandeur wisdom but admittedly the prose style is beautiful that one can read it like a well written novel and consider that time well spent。 I have been using rust at work comfortably before reading this book and knew everything talked about in the book either from trial and error or from reading blogs/open source code etc。 But completing this book is like a rite of passage for rustaceans so I decided to give it a shot。 If you are already doing s/w eng。 for a while, it doesn't shock you with grandeur wisdom but admittedly the prose style is beautiful that one can read it like a well written novel and consider that time well spent。 。。。more

Matt

This book presents a very easy to follow introduction to Rust。 It seems like a very cool programming language, and includes features such as:- Immutability: All variables are immutable by default, and must either be consumed when used, or explicitly marked as mutable。 This prevents code state from changing in unpredictable and hard-to-track ways。- Ownership: Only one function can have ownership of a variable at a time, which prevents memory issues。 Other functions can have either mutable or immu This book presents a very easy to follow introduction to Rust。 It seems like a very cool programming language, and includes features such as:- Immutability: All variables are immutable by default, and must either be consumed when used, or explicitly marked as mutable。 This prevents code state from changing in unpredictable and hard-to-track ways。- Ownership: Only one function can have ownership of a variable at a time, which prevents memory issues。 Other functions can have either mutable or immutable references to the variable, but the compiler forces a max of one mutable reference (with no simultaneous immutable references)。- Enums: The way enums are handled in Rust is really cool, and feels like a combination of the Enum and Union types in Python。- Option: The Option type forces explicit checking for None whenever such a return type is possible。- Error Handling: Rust forces error checking, and the simple syntax for passing errors back up to calling functions is really cool。- Traits: This is like the Protocol type in Python, and seems very useful。- Lifetimes: I don't understand how to use lifetimes yet, but I can see why they might be useful。- Tests: The way Rust sets up testing is very easy to use, and solves a lot of the problems I have with large unit testing suites in Python。- Closures: The built-in support for lazy evaluation using closures is pretty nice, and looks like it could save some time when evaluating code。 。。。more

Kslq

It has some good examples。 Unfortunantly its exhaustivly written, where the author keeps reenforce exhaustive descriptions and redundancy like "in Listing-18-18" in stead of just saying "below" and other distracting nonsence that takes away from the over all comprehension。 Basically it's an attempt to teach you like you are a very patient idiot, that enjoy being reminded of already established concepts。 Keep in mind, these frases are in evry sentence, so it gets exhaustive quickly。 Its full of b It has some good examples。 Unfortunantly its exhaustivly written, where the author keeps reenforce exhaustive descriptions and redundancy like "in Listing-18-18" in stead of just saying "below" and other distracting nonsence that takes away from the over all comprehension。 Basically it's an attempt to teach you like you are a very patient idiot, that enjoy being reminded of already established concepts。 Keep in mind, these frases are in evry sentence, so it gets exhaustive quickly。 Its full of back-tracking-references where simply stating a variable name would be succicient。 In stead of mentioning property x of y, it is full of jargon like "the x field of the Person struct wich is of type Person defined in mod stored in the non-borrowed mutable variable y in the main crate shown in listing 18-1。 Example: "Rather than encapsulating the states and transitions completely so outside code has no knowledge of them" The author should and can stop after "completely", but he rants on and not even adding appropriat comma, and this is just a simple and trivial example。 The book is full of junk sentences that add more words without more meaning, and a well written version of this book would have consisted of just half of the 500 pages this auther impressivly managed to stratch this book into。 Other than that, it is helping you getting started with rust, just in a very inefficent and frustrating way, because of the authors poor communication skills。 。。。more

Greg Stoll

An excellent way to learn Rust, with some fairly meaty topics to boot。 Every time I read through the book again I learn something!

Redowan Delowar

I'm not a system programmer, but I went through the book to satiate my intellectual curiosity and to experience the ergonomics of developing in Rust。 I live in the realm of backend development, data engineering, and data science and wanted to dip my toes into something that's a little lower level than Go。 After fiddling with the examples, and attempting to internalize a few concepts, it was apparent to me that Rust has a better toolchain compared to Go。 The book perfectly lays out the concepts t I'm not a system programmer, but I went through the book to satiate my intellectual curiosity and to experience the ergonomics of developing in Rust。 I live in the realm of backend development, data engineering, and data science and wanted to dip my toes into something that's a little lower level than Go。 After fiddling with the examples, and attempting to internalize a few concepts, it was apparent to me that Rust has a better toolchain compared to Go。 The book perfectly lays out the concepts that are easily consumable for someone who is completely new to the Rust world, but has the experience of programming in other languages。The book only explains the concepts that are new to Rust, and the data structure chapter assumes that you have the necessary knowledge of the fundamentals of data structures。 It also doesn't dive too deep into Rust's internals。 Playing around with all the examples in the book helped me realize that although Rust has an incredible assortment of toolings, guaranteed memory safety, and bare-metal execution speed, development speed is pretty slow。 The sheer expressiveness of the language is immensely helpful if you're doing system programming but can slow you down by a factor of N if you're trying to do backend development with it。I highly recommend the book to anyone who wants to know how writing Rust feels like and whether it's the right tool for their job。 。。。more

Arthur

Thorough explanations covering all aspects of Rust。 The final project was a great way to bring it all back together。

Santos

Really awesome book! After like three times having started it and never finish I was able to finally focus on it。 It teaches you all you need to know to start your journey with Rust and understanding Rust code。 The final chapter was really cool, building a basic multithreading web server with everything learned from the book。

Joseph Knecht

Well-written introduction book to Rust。 The book also dives into some advanced topics towards the end。 There are plenty of examples, so if you like to learn by example, you should read this book。There are some key concepts that make Rust different than other programming languages。 Make sure you know Closures, Lifetimes, Ownership(Borrowing), Traits, Structs, Pointers etc。 The syntax is not the best because the many symbols tend to have dual meanings。 Also, many symbols。

Jon

Loved it, but I would like a few more exercises after each chapter (there is other free material available for the exercises, but I have a personal preference to have most things at one place)。

Zengmor

a well written and detailed introduction to the rust programming language。

Lucas

Meu primeiro contato com rust。 É uma linguagem fantástica。 É impressionante a consistência lógica de tudo。 Mas, ao menos para mim, é a linguagem mais difícil que tive contato até aqui。 Isso não deve surpreender。 Até hoje trabalhei apenas com linguagens de alto nível e nunca precisei me preocupar se um objeto que estava manipulando ficava no stack ou no heap。 O estranhamento é natural, portanto。Certamente seu estranhamento será menor que o meu se você é um programador de C。Se você nunca programou Meu primeiro contato com rust。 É uma linguagem fantástica。 É impressionante a consistência lógica de tudo。 Mas, ao menos para mim, é a linguagem mais difícil que tive contato até aqui。 Isso não deve surpreender。 Até hoje trabalhei apenas com linguagens de alto nível e nunca precisei me preocupar se um objeto que estava manipulando ficava no stack ou no heap。 O estranhamento é natural, portanto。Certamente seu estranhamento será menor que o meu se você é um programador de C。Se você nunca programou em outra linguagem, minha sugestão é começar por uma de alto nível。Apesar da dificuldade, que também se relaciona com a necessidade de aprender novos conceitos (se você vem de python: struct, enum; se você vem de qualquer outra linguagem: borrowing), o livro é extremamente bem escrito com leitura super acessível。 Eu aprendi muito, mas vou precisar voltar de tempos em tempos em cada capítulo que li。Se você quer aprender rust, eu não vejo outra forma que não lendo esse livro。 Não conheço nenhum curso online de boa qualidade e "meter a cara" na linguagem, como eu fiz, vai causar muita frustração, posso garantir。 。。。more

Wojtek

It is a great introduction to the language, semantics, basic idioms, and philosophy of it。 I really enjoyed that, because it contains relevant and not so dry examples。

kenardo simpson

You can see me no

Ashkan

It took me about 6 months to read this book completely。 I am already using Rust in a project but I like to be a senior Rust developer in future。The notes I took from this book can be found here:https://github。com/Ashkanph/my-notes/。。。 It took me about 6 months to read this book completely。 I am already using Rust in a project but I like to be a senior Rust developer in future。The notes I took from this book can be found here:https://github。com/Ashkanph/my-notes/。。。 。。。more

Sanjeev

Well written book。 I wanted a quick overview of the Rust language and got it with this book。 It seems to be a simple and well thought out language。 Now I need to find some project where I can put this language to use。

David

A good introduction to a very large language。 Even at 500+ pages, this book can only scratch the surface of Rust mastery for the reader。Interesting note: apparently this has grown by 250 pages since the early edition I first read in 2015!

Clara

Dropped this around ch5 when life got way too hectic。 Tried to pick it up again two moves later, but it's not as useful to me right now as books on C。 It probably never will be, given the relative rates of adoption。Even so, I hope to return to it。 A lot of time is spent on explaining quirks of the language like ownership, which revolve around ensuring memory safety without garbage collection。 While these concepts are explained clearly enough to approach as a dedicated beginner, this book is prob Dropped this around ch5 when life got way too hectic。 Tried to pick it up again two moves later, but it's not as useful to me right now as books on C。 It probably never will be, given the relative rates of adoption。Even so, I hope to return to it。 A lot of time is spent on explaining quirks of the language like ownership, which revolve around ensuring memory safety without garbage collection。 While these concepts are explained clearly enough to approach as a dedicated beginner, this book is probably most useful to someone already comfortable with other system programming languages like C or C++。 The code examples in the online version illustrate the concepts well and run in the browser, but in most cases you'll have to run them on your own machine to see and interact with the best part of the language in my opinion: the delightfully verbose compiler messages you get when you have errors in your code。 Fortunately, in addition to Rust By Example, there's a handy set of extra companion exercises that run in your terminal and a text editor of your choice:https://github。com/rust-lang/rustlingsThere's also a git repository linked in the online version with a version you can build locally in a manner similar to gitbook, naturally using Rust。 。。。more