• Stars
    star
    1,422
  • Rank 32,837 (Top 0.7 %)
  • Language
    Rust
  • License
    MIT License
  • Created over 4 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Code for Command-Line Rust (O'Reilly, 2022, ISBN 9781098109417) https://learning.oreilly.com/library/view/command-line-rust/9781098109424/

Command-Line Rust: A Project-Based Primer for Writing Rust CLIs

Rust

This is the code repository for the O'Reilly book Command-Line Rust (ISBN 9781098109417) by Ken Youens-Clark. The "main" branch has the original source code using version 2.33 of the clap crate, which was the latest version while I was writing the book. The "clap_v4" branch has been updated to use the builder pattern of clap version 4 along with clippy suggestions as of Rust 1.67.

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 to create command-line 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
  • Use and control randomness

More Repositories

1

tiny_python_projects

Code for Tiny Python Projects (Manning, 2020, ISBN 1617297518). Learning Python through test-driven development of games and puzzles.
Python
1,383
star
2

biofx_python

Code for Mastering Python for Bioinformatics (O'Reilly, 2021, ISBN 9781098100889)
Python
191
star
3

sysadminshow

Code for Sysadmin Show Podcast
Python
89
star
4

new.py

Python program to write new Python programs
Python
38
star
5

make-tutorial

Tutorial on using Makefiles
Makefile
26
star
6

bioinformatics_primer

Bioinformatics with Unix, bash, Make, Python, and parallel
Python
20
star
7

metagenomics-book

Example code from metagenomics book (https://www.gitbook.com/book/kyclark/metagenomics/details)
Python
15
star
8

more_tiny_python_projects

Second volume of exercises
Python
11
star
9

excel2txt-py

Excel to delimited text (Python version)
Python
4
star
10

cutr

Rust version of `cut` that respects delimiters
Rust
4
star
11

rust-algorithms

Learning Algorithms in Rust
Rust
3
star
12

parallelprocs

Call GNU Parallel from Python
Python
3
star
13

commr

Rust version of `comm`
Rust
3
star
14

command_line_python

Command-Line Python
Python
2
star
15

remote.python.pizza

Python Pizza presentation and code
Python
2
star
16

csvchk

Rust version of csvchk
Rust
2
star
17

abe487

Perl
2
star
18

resbaz2020

Presentation for UA ResBaz 2020
Python
1
star
19

rust-paste

Rust version of paste
Rust
1
star
20

ecol596

R
1
star
21

rust-csvchk

CSV/Tab check
Rust
1
star
22

lebauer-testing

Testing ideas for LeBauer projects
Python
1
star
23

rust-atomics

Rust
1
star
24

excel2txt-rust

Rust implementation of excel2txt
Rust
1
star
25

csvchk-py

Check one record of a delimited text file
Python
1
star
26

rosalind.info

Solutions to rosalind.info problems.
Python
1
star
27

genbank-parser

genbank-parser
Perl
1
star
28

excel2txt

Excel to text
Perl
1
star
29

norvig_ngrams

Python3 port of Peter Norvig's ngrams code
Python
1
star
30

rust-hangman

Rust implementation of Hangman
Rust
1
star
31

dire

Python equivalent of Perl's warn/die functions
Python
1
star
32

greweln

Example code
Rust
1
star