Command-Line Rust: A Project-Based Primer for Writing Rust Clis (Paperback)

Youens-Clark, Ken

買這商品的人也買了...

相關主題

商品描述

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 focusing 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 such as numbers, strings, vectors, structs, Options, and Results 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 manually, using regular expressions and Rust crates
  • Use and control randomness

商品描述(中文翻譯)

數年來,Rust在Stack Overflow的年度開發者調查中連續多年被評為最受喜愛的程式語言。這個開源系統程式語言現在被用於從遊戲引擎和作業系統到瀏覽器元件和虛擬實境模擬引擎的各種應用。但是,Rust也是一個非常複雜的語言,學習曲線非常陡峭。

這本指南不是專注於整個語言,而是通過每個章節中的一個小型、完整且專注的程式來教授Rust。作者Ken Youens-Clark向您展示如何開始、編寫和測試這些程式,以創建一個成品。您將學習如何在Rust中處理錯誤、讀寫文件,以及使用正則表達式、Rust類型、結構體等。

了解如何:

- 使用Rust的標準庫和數據類型,如數字、字符串、向量、結構體、選項和結果,來創建命令行程式
- 編寫和測試Rust程式和函數
- 讀寫文件,包括標準輸入、標準輸出和標準錯誤輸出
- 文件化和驗證命令行參數
- 編寫優雅處理錯誤的程式
- 手動解析原始和分隔的文本,使用正則表達式和Rust套件
- 使用和控制隨機性

作者簡介

Ken Youens-Clark is the author of Tiny Python Projects (Manning, 2020) and Mastering Python for Bioinformatics (O'Reilly, 2021). Ken is a senior-level developer with 25 years of experience writing and supporting code written in many languages who has spent several years teaching beginning coding at the university level, and is deeply committed to creating useful teaching resources for people who wish to learn coding.

作者簡介(中文翻譯)

Ken Youens-Clark 是《Tiny Python Projects》(Manning, 2020)和《Mastering Python for Bioinformatics》(O'Reilly, 2021)的作者。Ken 是一位有著 25 年經驗的高級開發人員,擅長多種程式語言的編寫和支援。他在大學教授初學者編程數年,並致力於為希望學習編程的人創建有用的教學資源。