Home Page Icon
Home Page
Table of Contents for
Systems Programming with Rust
Close
Systems Programming with Rust
by
Systems Programming with Rust
Preface
What Is Rust (And Why Is Everybody Talkin’ About It)?
Who Should Read This Book
Why You Should Learn Rust
The Coding Challenges
Getting Rust and the Code
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments
1. Truth Or Consequences
Getting Started with “Hello, world!”
Organizing a Rust Project Directory
Creating and Running a Project with Cargo
Writing and Running Integration Tests
Adding a Project Dependency
Understanding Program Exit Values
Testing the Program Output
Exit Values Make Programs Composable
Summary
2. Test for Echo
Starting a New Binary Program with Cargo
How echo Works
Getting Command-Line Arguments
Adding clap as a Dependency
Parsing Command-Line Arguments Using clap
Creating the Program Output
Integration and Unit Tests
Creating the Test Output Files
Comparing Program Output
Using the Result Type
Summary
3. On The Catwalk
How cat Works
Getting Started with Test-Driven Development
Creating a Library Crate
Defining the Parameters
Processing the Files
Opening a File or STDIN
Solution
Reading the Lines in a File
Printing Line Numbers
Going Further
Summary
4. Head Aches
How head Works
Getting Started
Parsing Strings into Numbers
Converting Strings into Errors
Defining the Arguments
Processing the Input Files
Reading Bytes versus Characters
Solution
Reading a File Line-by-line
Preserving Line Endings While Reading a File
Reading Bytes from a File
Printing the File Separators
Going Further
Summary
5. Word To Your Mother
How wc Works
Getting Started
Iterating the Files
Solution
Counting the Elements of a File or STDIN
Formatting the Output
Going Further
Summary
6. Den of Uniquity
How uniq Works
Getting Started
Defining the Arguments
Testing the Program
Solution
Going Further
Summary
7. Finders Keepers
How find Works
Getting Started
Defining the Arguments
Validating the Arguments
Find All the Things
Solution
Going Further
Summary
8. Shave and a Haircut
How cut Works
Getting Started
Defining the Arguments
Parsing the Position List
Extracting Characters or Bytes
Parsing Delimited Text Files
Solution
Going Further
Summary
9. Jack the Grepper
How grep Works
Getting Started
Defining the Arguments
Finding the Files to Search
Finding the Matching Lines of Input
Solution
Going Further
Summary
10. Boston Commons
How comm Works
Getting Started
Defining the Arguments
Validating and Opening the Input Files
Processing the Files
Solution
Going Further
Summary
11. Epilogue
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Next
Next Chapter
Systems Programming with Rust
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset