This is not your typical programming book! Jump right in with interesting, useful programs, some of which are drawn from classic computer science problems as a way of talking about the programming constructs in the language rather than explaining everything in a dry, theoretical manner that doesn’t translate well to implementation.
Rust programming has been the "most loved programming language" in the Stack Overflow Developer Survey every year since 2016!
Learn why programmers are using Rust due to it's performance and efficency, without the errors and crashes that a programmer would find in common languages such as C and C++. Built around solving real problems, this book will help introduce you to computer science problems that can be built upon to create solutions for other problems.
LEARN BY DOING: This book will focus on a practical approach to learing Rust. You will learn all of the language fundamentals through the use of programming examples that do interesting things! All of the programs covered will be based on a computer science problem or othre interesting problems that can be used as a foundation for demonstrating language syntax, data types and structures, and other features or techniques for developing programs.
Introduction |
|
xix | |
|
Chapter 1 Game Of Life: The Basics |
|
|
1 | (26) |
|
Game of Life: The Program |
|
|
2 | (2) |
|
|
4 | (1) |
|
Putting the Pieces Together |
|
|
5 | (2) |
|
Bringing In External Functionality |
|
|
5 | (1) |
|
|
6 | (1) |
|
|
7 | (1) |
|
|
8 | (8) |
|
|
8 | (1) |
|
|
9 | (2) |
|
|
11 | (1) |
|
|
12 | (2) |
|
|
14 | (2) |
|
Looking at More Function Functions |
|
|
16 | (6) |
|
|
16 | (2) |
|
|
18 | (3) |
|
|
21 | (1) |
|
|
22 | (2) |
|
|
24 | (1) |
|
|
25 | (1) |
|
|
25 | (2) |
|
|
27 | (22) |
|
|
28 | (2) |
|
|
30 | (9) |
|
|
32 | (2) |
|
Working with Command-Line Arguments |
|
|
34 | (2) |
|
|
36 | (3) |
|
|
39 | (4) |
|
|
41 | (1) |
|
Populating from the Vector |
|
|
42 | (1) |
|
Outputting to the Terminal |
|
|
43 | (3) |
|
|
44 | (1) |
|
|
44 | (2) |
|
|
46 | (2) |
|
|
48 | (1) |
|
|
48 | (1) |
|
Chapter 3 Building A Library |
|
|
49 | (22) |
|
|
50 | (3) |
|
|
53 | (9) |
|
Traits and Implementations |
|
|
56 | (4) |
|
|
60 | (1) |
|
|
60 | (2) |
|
|
62 | (5) |
|
|
65 | (2) |
|
|
67 | (2) |
|
|
69 | (1) |
|
|
69 | (2) |
|
|
71 | (26) |
|
|
74 | (10) |
|
|
77 | (2) |
|
|
79 | (3) |
|
|
82 | (1) |
|
Finishing Up the Implementation |
|
|
83 | (1) |
|
Reading Files and Selecting Words |
|
|
84 | (6) |
|
Handling Errors Concisely |
|
|
85 | (2) |
|
|
87 | (1) |
|
|
88 | (2) |
|
|
90 | (4) |
|
|
91 | (1) |
|
|
92 | (2) |
|
|
94 | (1) |
|
|
95 | (1) |
|
|
95 | (2) |
|
|
97 | (24) |
|
|
98 | (8) |
|
|
101 | (2) |
|
Interprocess Communications |
|
|
103 | (3) |
|
|
106 | (8) |
|
|
107 | (2) |
|
File and Directory Handling |
|
|
109 | (3) |
|
|
112 | (2) |
|
|
114 | (4) |
|
|
115 | (1) |
|
|
116 | (1) |
|
|
117 | (1) |
|
|
118 | (1) |
|
|
119 | (1) |
|
|
119 | (2) |
|
Chapter 6 Clients And Servers |
|
|
121 | (20) |
|
|
123 | (2) |
|
|
125 | (6) |
|
|
128 | (3) |
|
|
131 | (8) |
|
|
134 | (3) |
|
|
137 | (2) |
|
|
139 | (1) |
|
|
140 | (1) |
|
|
140 | (1) |
|
Chapter 7 Client-Side Applications |
|
|
141 | (24) |
|
|
142 | (12) |
|
|
144 | (1) |
|
|
145 | (2) |
|
|
147 | (1) |
|
Transport Layer Security (TLS) |
|
|
147 | (4) |
|
|
151 | (3) |
|
|
154 | (9) |
|
|
156 | (1) |
|
|
157 | (1) |
|
|
157 | (2) |
|
|
159 | (4) |
|
|
163 | (1) |
|
|
164 | (1) |
|
|
164 | (1) |
|
Chapter 8 Going Relational |
|
|
165 | (26) |
|
Application Architectures |
|
|
166 | (6) |
|
|
167 | (2) |
|
|
169 | (2) |
|
|
171 | (1) |
|
|
172 | (5) |
|
Structured Query Language |
|
|
172 | (3) |
|
|
175 | (1) |
|
|
176 | (1) |
|
Writing a Database Program |
|
|
177 | (12) |
|
|
178 | (5) |
|
|
183 | (1) |
|
|
184 | (2) |
|
|
186 | (3) |
|
|
189 | (1) |
|
|
190 | (1) |
|
|
190 | (1) |
|
|
191 | (24) |
|
|
192 | (6) |
|
|
195 | (3) |
|
|
198 | (4) |
|
|
202 | (11) |
|
|
202 | (4) |
|
Reading in Data from a File |
|
|
206 | (1) |
|
|
207 | (2) |
|
|
209 | (4) |
|
|
213 | (1) |
|
|
214 | (1) |
|
|
214 | (1) |
|
Chapter 10 Web Communications |
|
|
215 | (26) |
|
|
216 | (3) |
|
Hypertext Transfer Protocol |
|
|
219 | (10) |
|
Programmatic Communication |
|
|
222 | (5) |
|
Web Communication Over TLS |
|
|
227 | (2) |
|
|
229 | (9) |
|
|
232 | (5) |
|
|
237 | (1) |
|
|
238 | (1) |
|
|
239 | (1) |
|
|
240 | (1) |
|
|
241 | (24) |
|
Offensive vs. Defensive Programming |
|
|
242 | (3) |
|
Web Application Communications |
|
|
245 | (10) |
|
Web Application Parameters |
|
|
245 | (3) |
|
Asynchronous JavaScript and XML |
|
|
248 | (1) |
|
Representational State Transfer |
|
|
249 | (1) |
|
APIs in Node.js and Python |
|
|
250 | (2) |
|
|
252 | (3) |
|
|
255 | (7) |
|
|
262 | (1) |
|
|
262 | (1) |
|
|
263 | (2) |
|
Chapter 12 Getting To The System |
|
|
265 | (26) |
|
|
266 | (6) |
|
|
272 | (10) |
|
Programmatic Access to the Registry |
|
|
275 | (2) |
|
Using Rust to Access the Registry |
|
|
277 | (5) |
|
System Information with Rust |
|
|
282 | (5) |
|
|
287 | (2) |
|
|
289 | (1) |
|
|
290 | (1) |
|
|
290 | (1) |
|
Chapter 13 Device Programming |
|
|
291 | (30) |
|
|
292 | (13) |
|
|
292 | (7) |
|
|
299 | (6) |
|
Working with Raspberry Pi |
|
|
305 | (13) |
|
|
310 | (5) |
|
|
315 | (3) |
|
|
318 | (1) |
|
|
319 | (1) |
|
|
319 | (2) |
|
Chapter 14 Collecting Stuff |
|
|
321 | (26) |
|
|
322 | (7) |
|
|
329 | (11) |
|
|
333 | (3) |
|
|
336 | (1) |
|
|
337 | (3) |
|
|
340 | (5) |
|
|
345 | (1) |
|
|
346 | (1) |
|
|
346 | (1) |
|
|
347 | (28) |
|
|
348 | (12) |
|
|
350 | (1) |
|
|
351 | (2) |
|
|
353 | (7) |
|
|
360 | (4) |
|
|
364 | (7) |
|
|
366 | (3) |
|
|
369 | (2) |
|
|
371 | (2) |
|
|
373 | (1) |
|
|
373 | (2) |
Index |
|
375 | |
About the Author
Ric 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.