✓ Schweizer Online-Shop
Erhältlich:Nicht auf LagerBuch (Softcover): Fachbuch

Rust For Command-Line Tools

One Binary, Zero Dependencies

von Roan Whitaker

Unsere Artikel-Nr.
P36352197

Beschreibung

The shell script grew up. Now it needs to be a real tool. It started as twenty lines. Then it got a flag, then another, then a configfile, then error handling that no longer fit in a case statement. It is slow onlarge inputs, it breaks when piped, it prints color into files that should nothave it, and nobody can install it without the right version of three otherthings. You already know what it should be: a single fast binary that startsinstantly, behaves correctly in a pipe, and runs anywhere with nothing to>This book teaches you to build exactly that, in Rust. It is not a general Rust tutorial. It is about the specific craft of thecommand-line environment - the parts that separate a script that technicallyworks from a tool people trust: exit codes that mean something, output thatknows whether it is talking to a terminal or a pipe, errors a user can act on, >WHO IT IS FOR. Two readers. If you have written a shell script that outgrew the shell, you arehere - no prior Rust needed, since each language feature is introduced when theproblem calls for it. And if you already know Rust but have only built webservices or embedded firmware, this book covers what the command line demandsthat those environments never taught you: the signal model, terminal detection, >WHAT YOU WILL BE ABLE TO DO. - Parse arguments cleanly with clap, including subcommands and help - Read from files, stdin, and streams without loading everything into memory - Return exit codes and errors that scripts and users can act on - Produce output that behaves: color on a terminal, plain text in a pipe - Layer configuration correctly across flags, files, and the environment - Show progress and spinners for long-running work - Do filesystem work safely, respecting ignore files and temp directories - Test CLI tools properly, including output snapshots - Add concurrency for throughput with Rayon - Handle signals, interrupts, and SIGPIPE for a clean shutdown>THE PAYOFF. Fifteen chapters build toward a capstone: sift, a fast search tool in thespirit of grep and ripgrep - argument parsing, streaming input, parallelsearch, terminal-aware output, and correct signal handling, assembled into onepolished binary you would actually put on your PATH. A companion download>Every chapter ends with a quiz, and every answer is explained in Appendix A. WHY THIS BOOK. Most tutorials stop at "it compiles and prints the answer. " Real tools live inpipelines, get interrupted, run in scripts, and are installed by strangers. This book is about everything that happens after it prints the answer - the>PREREQUISITES. You are comfortable with the command line as a user - pipes, exit codes, why a>Part of the RUST IN PRACTICE series. from Waskey Press. Each volume stands>Scroll up and start building tools people trust.

Spezifikationen

SpracheEnglisch
AutorRoan Whitaker
Erscheinungsjahr2026
FormatBuch (Softcover)
Anzahl Seiten264

Bewertungen

Produkt bewerten

Für dieses Produkt liegt noch keine Bewertung vor. Wenn Sie es gekauft haben, teilen Sie gerne Ihre Erfahrung.

Zahlungsarten

payment-einzahlungsscheinpayment-twintpayment-mastercardpayment-visapost-finance-paypayment-apple-paypayment-google-paysamsung-pay

Rechnung (Einzahlungsschein mit QR-Code), Twint, Kreditkarte, PostFinance, Apple, Google oder Samsung Pay.

Versand

Kostenlos: Schweiz & Liechtenstein

Rückgabe

30 Tage Rückgaberecht

Sie können das Produkt innerhalb von 30 Wochentagen ohne Angabe von Gründen zurücksenden, sofern es unbeschädigt und in der Originalverpackung ist.

Weitere Hinweise finden Sie in unseren AGB unter D.1.