Details

Beginning Rust Programming


Beginning Rust Programming


1. Aufl.

von: Ric Messier

32,99 €

Verlag: Wiley
Format: EPUB
Veröffentl.: 17.02.2021
ISBN/EAN: 9781119712879
Sprache: englisch
Anzahl Seiten: 416

DRM-geschütztes eBook, Sie benötigen z.B. Adobe Digital Editions und eine Adobe ID zum Lesen.

Beschreibungen

<p><b>Quickly learn the ropes with the Rust programming language using this practical, step-by-step guide <br /><br /></b>In <i>Beginning Rust Programming</i>, accomplished programmer and author Ric Messier delivers a highly practical, real-world guide to coding with Rust. Avoiding dry, theoretical content and “Hello, world”-type tutorials of questionable utility, the book dives immediately into functional Rust programming that takes advantage of the language’s blazing speed and memory efficiency. <br /><br />Designed from the ground up to give you a running start to using the multiparadigm system programming language, this book will teach you to: </p> <ul> <li>Solve real-world computer science problems of practical importance </li> <li>Use Rust’s rich type system and ownership model to guarantee memory-safety and thread-safety </li> <li>Integrate Rust with other programming languages and use it for embedded devices </li> </ul> <p>Perfect for programmers with some experience in other languages, like C or C++, <i>Beginning Rust Programming</i> is also a great pick for students new to programming and seeking a user-friendly and robust language with which to start their coding career.</p>
<p>Introduction xix</p> <p><b>Chapter 1: Game of Life: The Basics 1</b></p> <p>Game of Life: The Program 2</p> <p>Starting with Cargo 4</p> <p>Putting the Pieces Together 5</p> <p>Bringing In External Functionality 5</p> <p>Namespaces 6</p> <p>Generating the Game Grid 7</p> <p>Dissecting Main 8</p> <p>Defining Functions 8</p> <p>Defining Variables 9</p> <p>Datatypes 11</p> <p>Arrays 12</p> <p>Control Structures 14</p> <p>Looking at More Function Functions 16</p> <p>Returning Values 16</p> <p>Passing Parameters 18</p> <p>Scope 21</p> <p>Compiling Programs 22</p> <p>Summary 24</p> <p>Exercises 25</p> <p>Additional Resources 25</p> <p><b>Chapter 2: Extended Life 27</b></p> <p>Understanding Ownership 28</p> <p>Extending Life 30</p> <p>Adding Modules 32</p> <p>Working with Command-Line Arguments 34</p> <p>Option Types 36</p> <p>Reading from Files 39</p> <p>Extracting Values 41</p> <p>Populating from the Vector 42</p> <p>Outputting to the Terminal 43</p> <p>Using Colors 44</p> <p>Printing Generations 44</p> <p>Summary 46</p> <p>Exercises 48</p> <p>Additional Resources 48</p> <p><b>Chapter 3: Building A Library 49</b></p> <p>References 50</p> <p>First Pass 53</p> <p>Traits and Implementations 56</p> <p>Self-Identification 60</p> <p>The Rest 60</p> <p>Second Pass 62</p> <p>The Driver 65</p> <p>Summary 67</p> <p>Exercises 69</p> <p>Additional Resources 69</p> <p><b>Chapter 4: Hangman 71</b></p> <p>Our Data 74</p> <p>The Traits 77</p> <p>Implementations 79</p> <p>Using the <i>Option Enum 82</i></p> <p>Finishing Up the Implementation 83</p> <p>Reading Files and Selecting Words 84</p> <p>Handling Errors Concisely 85</p> <p>Generics and Bounds 87</p> <p>A Vector of Lines 88</p> <p>The Rest of the Story 90</p> <p>Initialization 91</p> <p>Playing the Game 92</p> <p>Summary 94</p> <p>Exercises 95</p> <p>Additional Resources 95</p> <p><b>Chapter 5: In Concurrence 97</b></p> <p>The Dining Philosophers 98</p> <p>Mutexes and Semaphores 101</p> <p>Interprocess Communications 103</p> <p>The Main Event 106</p> <p>Unix Sockets 107</p> <p>File and Directory Handling 109</p> <p>Closures 112</p> <p>Threading in the Main 114</p> <p>Creating Streams 115</p> <p>Cryptographic Hashing 116</p> <p>Creating Threads 117</p> <p>Summary 118</p> <p>Exercises 119</p> <p>Additional Resources 119</p> <p><b>Chapter 6: Clients and Servers 121</b></p> <p>Planning 123</p> <p>Network Programming 125</p> <p>Programming Sockets 128</p> <p>Rust TCP Server 131</p> <p>Handling Requests 134</p> <p>Operating System Calls 137</p> <p>Summary 139</p> <p>Exercises 140</p> <p>Additional Resources 140</p> <p><b>Chapter 7: Client-Side Applications 141</b></p> <p>Encryption 142</p> <p>Encryption Algorithms 144</p> <p>Going Hybrid 145</p> <p>Encryption Algorithms 147</p> <p>Transport Layer Security (TLS) 147</p> <p>TLS Server 151</p> <p>Remote Access Client 154</p> <p>Creating the Connection 156</p> <p>Validating Input 157</p> <p>Regular Expressions 157</p> <p>The Final Function 159</p> <p>Summary 163</p> <p>Exercises 164</p> <p>Additional Resources 164</p> <p><b>Chapter 8: Going Relational 165</b></p> <p>Application Architectures 166</p> <p>n-Tier Applications 167</p> <p>Microservices 169</p> <p>Model-View-Controller 171</p> <p>Databases 172</p> <p>Structured Query Language 172</p> <p>Server or Embedded 175</p> <p>Accessing Databases 176</p> <p>Writing a Database Program 177</p> <p>Main and Modules 178</p> <p>Database Functions 183</p> <p>Adding Records 184</p> <p>Listing Records 186</p> <p>Summary 189</p> <p>Exercises 190</p> <p>Additional Resources 190</p> <p><b>Chapter 9: NO(SQL) Going 191</b></p> <p>Assertions 192</p> <p>Design by Contract 195</p> <p>NoSQL 198</p> <p>Working with MongoDB 202</p> <p>Inserting Data 202</p> <p>Reading in Data from a File 206</p> <p>Populating the Database 207</p> <p>Retrieving Values 209</p> <p>Summary 213</p> <p>Exercises 214</p> <p>Additional Resources 214</p> <p><b>Chapter 10: Web Communications 215</b></p> <p>Style Guides 216</p> <p>Hypertext Transfer Protocol 219</p> <p>Programmatic Communication 222</p> <p>Web Communication Over TLS 227</p> <p>Client Communication 229</p> <p>Jumping Ahead 232</p> <p>Jumping Back 237</p> <p>Summary 238</p> <p>Exercises 239</p> <p>Additional Resources 240</p> <p><b>Chapter 11: Web Server 241</b></p> <p>Offensive vs. Defensive Programming 242</p> <p>Web Application Communications 245</p> <p>Web Application Parameters 245</p> <p>Asynchronous JavaScript and XML 248</p> <p>Representational State Transfer 249</p> <p>APIs in Node.js and Python 250</p> <p>API Server in Rust 252</p> <p>Rust Rocket 255</p> <p>Summary 262</p> <p>Exercises 262</p> <p>Additional Resources 263</p> <p><b>Chapter 12: Getting to the System 265</b></p> <p>Extending Functionality 266</p> <p>Windows Registry 272</p> <p>Programmatic Access to the Registry 275</p> <p>Using Rust to Access the Registry 277</p> <p>System Information with Rust 282</p> <p>Persistence (for Fun) 287</p> <p>Summary 289</p> <p>Exercises 290</p> <p>Additional Resources 290</p> <p><b>Chapter 13: Device Programming 291</b></p> <p>Logging 292</p> <p>Using syslog 292</p> <p>Using Windows Event Logs 299</p> <p>Working with Raspberry Pi 305</p> <p>Lighting Lights 310</p> <p>Reading GPIO 315</p> <p>Summary 318</p> <p>Exercises 319</p> <p>Additional Resources 319</p> <p><b>Chapter 14: Collecting Stuff 321</b></p> <p>Arrays and Vectors 322</p> <p>Linked Lists 329</p> <p>Stacks 333</p> <p>Queues 336</p> <p>Sorting 337</p> <p>Search Trees 340</p> <p>Summary 345</p> <p>Exercises 346</p> <p>Additional Resources 346</p> <p><b>Chapter 15: Odds and Sods 347</b></p> <p>Unit Testing 348</p> <p>Testing Types 350</p> <p>Test Plans 351</p> <p>Unit Tests 353</p> <p>Recursion 360</p> <p>Machine Learning 364</p> <p>Chatbots 366</p> <p>Neural Networks 369</p> <p>Summary 371</p> <p>Exercises 373</p> <p>Additional Resources 373</p> <p>Index 375</p>
<p><b>About the Author</b> <p><b>Ric Messier</b> is Senior Information Security Consultant with FireEye Mandiant. He is an author, consultant, and educator who holds GCIH, GSEC, CEH, and CISSP certifications and has published several books on information security and digital forensics. He is familiar with a wide variety of languages, including BASIC, Pascal, C, C++, C#, Rexx, Perl, Python, Java, Go, Swift, and Objective-C. <p><b>Visit us at wrox.com for free code samples.</b>
<p><b>A practical guide for quickly getting started with the Rust programming language</b> <p>Ric Messier delivers a concise step-by-step guide to the essentials of the Rust programming language. The book is designed to allow the reader to begin programming useful tools almost immediately. It takes a practical approach to teaching Rust by showing the language in the context of similar programming languages. <p>Eschewing a dry and theoretical approach, the book helps you jump right into the language with interesting programs drawn from classic computer science problems. You’ll discover how to make the most use of Rust’s efficiency and performance without encountering the errors and crashes you might experience in other common languages like C and C++. <p>The book covers the language’s fundamentals, including language syntax, data types and structures, and other features and techniques for developing programs. It discusses Rust’s rich type system and ownership model that helps you guarantee memorysafety and thread-safety, eliminating many classes of bugs at compile-time. <p>This practical and instructive book teaches you:<BR> <ul> <li>To take advantage of Rust’s blazing speed and memory-efficiency</li> <li>To use the language for embedded devices and how to integrate it with other languages</li> <li>Skip the “Hello, world” shenanigans and skip right to practical programming techniques you can put to use immediately</li> </ul> <p><b>Wrox Beginning guides</b> are crafted to make learning programming languages and technologies easier than you think, providing a structured, tutorial format that guides you through all the techniques involved.

Diese Produkte könnten Sie auch interessieren:

Domain Architectures
Domain Architectures
von: Daniel J. Duffy
PDF ebook
31,99 €