diff --git a/nostarch/acknowledgments.md b/nostarch/acknowledgments.md new file mode 100644 index 00000000..89d4adff --- /dev/null +++ b/nostarch/acknowledgments.md @@ -0,0 +1,19 @@ +# Acknowledgments + +We would like to thank everyone who has worked on the Rust language for +creating an amazing language worth writing a book about. We’re grateful to +everyone in the Rust community for being welcoming and creating an environment +worth welcoming more folks into. + +We’re especially thankful for everyone who read early versions of this book +online and provided feedback, bug reports, and pull requests. Special thanks to +Eduard-Mihai Burtescu, Alex Crichton, and JT for providing technical review and +Karen Rustad Tölva for the cover art. Thank you to our team at No Starch, +including Bill Pollock, Liz Chadwick, and Janelle Ludowise, for improving this +book and bringing it to print. + + + +Carol is grateful for the opportunity to work on this book. She thanks her +family for their constant love and support, especially her husband Jake +Goulding and her daughter Vivian. diff --git a/nostarch/bio.md b/nostarch/bio.md new file mode 100644 index 00000000..cbb2bd4b --- /dev/null +++ b/nostarch/bio.md @@ -0,0 +1,5 @@ +# About the Authors + + + +Carol Nichols is a member of the Rust Crates.io Team and a former member of the Rust Core Team. She’s a co-founder of Integer 32, LLC, the world’s first Rust-focused software consultancy. Nichols has also organized the Rust Belt Rust Conference. \ No newline at end of file diff --git a/nostarch/foreword.md b/nostarch/foreword.md new file mode 100644 index 00000000..2265e271 --- /dev/null +++ b/nostarch/foreword.md @@ -0,0 +1,41 @@ +# Foreword + +It wasn’t always so clear, but the Rust programming language is fundamentally +about *empowerment*: no matter what kind of code you are writing now, Rust +empowers you to reach farther, to program with confidence in a wider variety of +domains than you did before. + +Take, for example, “systems-level” work that deals with low-level details of +memory management, data representation, and concurrency. Traditionally, this +realm of programming is seen as arcane, accessible only to a select few who +have devoted the necessary years learning to avoid its infamous pitfalls. And +even those who practice it do so with caution, lest their code be open to +exploits, crashes, or corruption. + +Rust breaks down these barriers by eliminating the old pitfalls and providing a +friendly, polished set of tools to help you along the way. Programmers who need +to “dip down” into lower-level control can do so with Rust, without taking on +the customary risk of crashes or security holes, and without having to learn +the fine points of a fickle toolchain. Better yet, the language is designed to +guide you naturally towards reliable code that is efficient in terms of speed +and memory usage. + +Programmers who are already working with low-level code can use Rust to raise +their ambitions. For example, introducing parallelism in Rust is a relatively +low-risk operation: the compiler will catch the classical mistakes for you. And +you can tackle more aggressive optimizations in your code with the confidence +that you won’t accidentally introduce crashes or vulnerabilities. + +But Rust isn’t limited to low-level systems programming. It’s expressive and +ergonomic enough to make CLI apps, web servers, and many other kinds of code +quite pleasant to write — you’ll find simple examples of both later in the +book. Working with Rust allows you to build skills that transfer from one +domain to another; you can learn Rust by writing a web app, then apply those +same skills to target your Raspberry Pi. + +This book fully embraces the potential of Rust to empower its users. It’s a +friendly and approachable text intended to help you level up not just your +knowledge of Rust, but also your reach and confidence as a programmer in +general. So dive in, get ready to learn—and welcome to the Rust community! + +— Nicholas Matsakis and Aaron Turon diff --git a/nostarch/preface.md b/nostarch/preface.md new file mode 100644 index 00000000..5ec23915 --- /dev/null +++ b/nostarch/preface.md @@ -0,0 +1,22 @@ +# Preface + +This version of the text assumes you’re using Rust 1.62.0 (released 2022-06-30) +or later with edition="2021" in *Cargo.toml* of all projects to use Rust 2021 +Edition idioms. See “Installation” on page 1 to install or update Rust, and see +Appendix E for information on editions. + +The 2021 Edition of the Rust language includes a small number of improvements +that make Rust more ergonomic and correct some inconsistencies. This rendition +of the book has a number of improvements to address feedback: + +• Chapter 7 contains a new quick reference section on organizing your code into +multiple files with modules. +• Chapter 13 has new and improved closure examples that more clearly illustrate +captures, the `move` keyword, and the `Fn` traits. +• We fixed a number of small errors and imprecise wording throughout the book. +Thank you to the readers who reported them! + +Note that any code in earlier renditions of this book that compiled will +continue to compile with the relevant edition in the project’s *Cargo.toml*, +even as you update the Rust compiler version you’re using. That’s Rust’s +backward compatibility guarantees at work!