Beginning Rust Programming

32,99 €*

Lieferzeit Sofort lieferbar

Beginning Rust Programming, Wiley
Von Ric Messier, im heise Shop in digitaler Fassung erhältlich
Format
(Hinweis: DRM-geschützt)
Anzahl:
Artikel-Beschreibung
QUICKLY LEARN THE ROPES WITH THE RUST PROGRAMMING LANGUAGE USING THIS PRACTICAL, STEP-BY-STEP GUIDE

In Beginning Rust Programming, 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.

Designed from the ground up to give you a running start to using the multiparadigm system programming language, this book will teach you to:

* Solve real-world computer science problems of practical importance
* Use Rust’s rich type system and ownership model to guarantee memory-safety and thread-safety
* Integrate Rust with other programming languages and use it for embedded devices

Perfect for programmers with some experience in other languages, like C or C++, Beginning Rust Programming 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.

ABOUT THE AUTHORRIC MESSIER 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. VISIT US AT WROX.COM FOR FREE CODE SAMPLES.Introduction xix

CHAPTER 1: GAME OF LIFE: THE BASICS 1

Game of Life: The Program 2

Starting with Cargo 4

Putting the Pieces Together 5

Bringing In External Functionality 5

Namespaces 6

Generating the Game Grid 7

Dissecting Main 8

Defining Functions 8

Defining Variables 9

Datatypes 11

Arrays 12

Control Structures 14

Looking at More Function Functions 16

Returning Values 16

Passing Parameters 18

Scope 21

Compiling Programs 22

Summary 24

Exercises 25

Additional Resources 25

CHAPTER 2: EXTENDED LIFE 27

Understanding Ownership 28

Extending Life 30

Adding Modules 32

Working with Command-Line Arguments 34

Option Types 36

Reading from Files 39

Extracting Values 41

Populating from the Vector 42

Outputting to the Terminal 43

Using Colors 44

Printing Generations 44

Summary 46

Exercises 48

Additional Resources 48

CHAPTER 3: BUILDING A LIBRARY 49

References 50

First Pass 53

Traits and Implementations 56

Self-Identification 60

The Rest 60

Second Pass 62

The Driver 65

Summary 67

Exercises 69

Additional Resources 69

CHAPTER 4: HANGMAN 71

Our Data 74

The Traits 77

Implementations 79

Using the Option Enum 82

Finishing Up the Implementation 83

Reading Files and Selecting Words 84

Handling Errors Concisely 85

Generics and Bounds 87

A Vector of Lines 88

The Rest of the Story 90

Initialization 91

Playing the Game 92

Summary 94

Exercises 95

Additional Resources 95

CHAPTER 5: IN CONCURRENCE 97

The Dining Philosophers 98

Mutexes and Semaphores 101

Interprocess Communications 103

The Main Event 106

Unix Sockets 107

File and Directory Handling 109

Closures 112

Threading in the Main 114

Creating Streams 115

Cryptographic Hashing 116

Creating Threads 117

Summary 118

Exercises 119

Additional Resources 119

CHAPTER 6: CLIENTS AND SERVERS 121

Planning 123

Network Programming 125

Programming Sockets 128

Rust TCP Server 131

Handling Requests 134

Operating System Calls 137

Summary 139

Exercises 140

Additional Resources 140

CHAPTER 7: CLIENT-SIDE APPLICATIONS 141

Encryption 142

Encryption Algorithms 144

Going Hybrid 145

Encryption Algorithms 147

Transport Layer Security (TLS) 147

TLS Server 151

Remote Access Client 154

Creating the Connection 156

Validating Input 157

Regular Expressions 157

The Final Function 159

Summary 163

Exercises 164

Additional Resources 164

CHAPTER 8: GOING RELATIONAL 165

Application Architectures 166

n-Tier Applications 167

Microservices 169

Model-View-Controller 171

Databases 172

Structured Query Language 172

Server or Embedded 175

Accessing Databases 176

Writing a Database Program 177

Main and Modules 178

Database Functions 183

Adding Records 184

Listing Records 186

Summary 189

Exercises 190

Additional Resources 190

CHAPTER 9: NO(SQL) GOING 191

Assertions 192

Design by Contract 195

NoSQL 198

Working with MongoDB 202

Inserting Data 202

Reading in Data from a File 206

Populating the Database 207

Retrieving Values 209

Summary 213

Exercises 214

Additional Resources 214

CHAPTER 10: WEB COMMUNICATIONS 215

Style Guides 216

Hypertext Transfer Protocol 219

Programmatic Communication 222

Web Communication Over TLS 227

Client Communication 229

Jumping Ahead 232

Jumping Back 237

Summary 238

Exercises 239

Additional Resources 240

CHAPTER 11: WEB SERVER 241

Offensive vs. Defensive Programming 242

Web Application Communications 245

Web Application Parameters 245

Asynchronous JavaScript and XML 248

Representational State Transfer 249

APIs in Node.js and Python 250

API Server in Rust 252

Rust Rocket 255

Summary 262

Exercises 262

Additional Resources 263

CHAPTER 12: GETTING TO THE SYSTEM 265

Extending Functionality 266

Windows Registry 272

Programmatic Access to the Registry 275

Using Rust to Access the Registry 277

System Information with Rust 282

Persistence (for Fun) 287

Summary 289

Exercises 290

Additional Resources 290

CHAPTER 13: DEVICE PROGRAMMING 291

Logging 292

Using syslog 292

Using Windows Event Logs 299

Working with Raspberry Pi 305

Lighting Lights 310

Reading GPIO 315

Summary 318

Exercises 319

Additional Resources 319

CHAPTER 14: COLLECTING STUFF 321

Arrays and Vectors 322

Linked Lists 329

Stacks 333

Queues 336

Sorting 337

Search Trees 340

Summary 345

Exercises 346

Additional Resources 346

CHAPTER 15: ODDS AND SODS 347

Unit Testing 348

Testing Types 350

Test Plans 351

Unit Tests 353

Recursion 360

Machine Learning 364

Chatbots 366

Neural Networks 369

Summary 371

Exercises 373

Additional Resources 373

Index 375
Artikel-Details
Anbieter:
Wiley
Autor:
Ric Messier
Artikelnummer:
9781119712879
Veröffentlicht:
17.02.2021
Seitenanzahl:
416