LitMy.ru - литература в один клик

Command-Line Rust: A Project-Based Primer for Writing Rust CLIs (Second Early Release)

  • Добавил: literator
  • Дата: 15-10-2021, 05:28
  • Комментариев: 0
Command-Line Rust: A Project-Based Primer for Writing Rust CLIs (Second Early Release)Название: Command-Line Rust: A Project-Based Primer for Writing Rust CLIs (Second Early Release)
Автор: Ken Youens-Clark
Издательство: O’Reilly Media, Inc.
Год: 2021-08-23
Страниц: 350
Язык: английский
Формат: epub
Размер: 10.1 MB

Rust is reputed to have a fairly steep learning curve, but I’m convinced you can learn it much more quickly by writing many small programs you already know. This book is about two things: systems programming and Rust. Writing Rust versions of basic systems tools like head and cal will reveal patterns that you’ll be able to use when you write your own programs—patterns like validating parameters, reading and writing file handles, parsing text, and using regular expressions. Rust is a programming language created by Graydon Hoare while working at Mozilla Research. He first started working on it around 2006 as a personal project, and by 2010 Mozilla had sponsored and announced the project. While the language is relatively new, it has quickly earned a passionate following of programmers who claim to even love using it.

For several consecutive years, Rust has been voted "most loved programming language" in Stack Overflow's annual developer survey. This open source systems programming language is now used for everything from game engines and operating systems to browser components and virtual reality simulation engines. But Rust is also an incredibly complex language with a notoriously difficult learning curve. Rather than focus on the language as a whole, this guide teaches Rust using a single small, complete, focused program in each chapter. Author Ken Youens-Clark shows you how to start, write, and test each of these programs to create a finished product. You'll learn how to handle errors in Rust, read and write files, and use regular expressions, Rust types, structs, and more.

Discover how to:

Use Rust's standard libraries and data types such as strings, vectors, dictionaries, and sets to create systems programs
Write and test Rust programs and functions
Read and write files, including stdin, stdout, and stderr
Document and validate command-line arguments
Write programs that fail gracefully
Parse raw and delimited text as well as Excel data
Use and control randomness

Who Should Read This Book:
If you’re reading this, I imagine you already know at least one programming language. Maybe your background is in statically typed languages like C++ or Java, or maybe like me, you’re coming from the world of dynamically typed languages. I’ve spent the bulk of my career using Perl and Python for web development and systems tasks, but I’ve been very interested in learning everything from Prolog and Haskell to jаvascript and Lisp. No matter your background, I hope to show you that Rust is a really fun language.

Rust requires learning some pretty low-level stuff about memory and types, so I can’t imagine it would be a great first language. I’m going to offload much of the nitty-gritty to reference books like Programming Rust (Blandy, Orendorff, and Tindall; O’Reilly, 2021) and The Rust Programming Language (Klabnik and Nichols; No Starch Press, 2019). I highly recommend that you read one or both of those along with this book to dig deeper into the language itself.

This book will focus on how to write practical programs, starting from scratch and working step-by-step to add features, build your program, work through error messages, and test your logic. You should read this book if you want to learn how to write complete programs that solve common systems problems. Although I’ll be showing why Rust is particularly well-suited for this, I think you should also try writing these programs in other languages you know so that you can contrast what makes Rust better or worse, easier or harder.

Скачать Command-Line Rust: A Project-Based Primer for Writing Rust CLIs (Second Early Release)












[related-news] [/related-news]
Внимание
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.