<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          Rust 在這個(gè)領(lǐng)域要大放異彩:一本新書(shū)推薦(附下載)

          共 4133字,需瀏覽 9分鐘

           ·

          2022-03-08 00:05

          以下內(nèi)容來(lái)源于逆鋒起筆,關(guān)注每日干貨及時(shí)送達(dá)

          據(jù)說(shuō)學(xué) Rust 的人中,有不少是前端的,主要是很多前端工具鏈采用 Rust 重寫(xiě)。不僅如此,終端命令工具,也有很多 Rust 的輪子。所以,學(xué)學(xué) Rust 造 command line 工具的輪子,對(duì)學(xué)習(xí) Rust 挺好。
          前幾天發(fā)現(xiàn)有一本專門講解 Rust 實(shí)現(xiàn)命令行工具的書(shū),推薦給大家。

          https://www.oreilly.com/library/view/command-line-rust/9781098109424/

          這本書(shū)不是專注于整個(gè)語(yǔ)言,而是在每一章中使用一個(gè)小型、完整的程序來(lái)講解 Rust。作者 Ken Youens-Clark 向你展示了如何啟動(dòng)、編寫(xiě)和測(cè)試每個(gè)程序以創(chuàng)建成品。你將學(xué)習(xí)如何處理 Rust 中的錯(cuò)誤、讀寫(xiě)文件以及使用正則表達(dá)式、Rust 類型、結(jié)構(gòu)等等。
          本書(shū)的目錄如下:
          1. Truth or Consequences
          1. Getting Started with “Hello, world!”
          2. Organizing a Rust Project Directory
          3. Creating and Running a Project with Cargo
          4. Writing and Running Integration Tests
            1. Adding a Project Dependency
            2. Understanding Program Exit Values
            3. Testing the Program Output
            4. Exit Values Make Programs Composable
          5. Summary
          2. Test for Echo
          1. How echo Works
          2. Getting Started
            1. Accessing the Command-Line Arguments
            2. Adding clap as a Dependency
            3. Parsing Command-Line Arguments Using clap
            4. Creating the Program Output
          3. Writing Integration Tests
            1. Creating the Test Output Files
            2. Comparing Program Output
            3. Using the Result Type
          4. Summary
          3. On the Catwalk
          1. How cat Works
          2. Getting Started
            1. Starting with Tests
            2. Creating a Library Crate
            3. Defining the Parameters
            4. Iterating Through the File Arguments
            5. Opening a File or STDIN
            6. Using the Test Suite
          3. Solution
            1. Reading the Lines in a File
            2. Printing Line Numbers
          4. Going Further
          5. Summary
          4. Head Aches
          1. How head Works
          2. Getting Started
            1. Writing a Unit Test to Parse a String into a Number
            2. Converting Strings into Errors
            3. Defining the Arguments
            4. Processing the Input Files
            5. Reading Bytes Versus Characters
          3. Solution
            1. Reading a File Line by Line
            2. Preserving Line Endings While Reading a File
            3. Reading Bytes from a File
            4. Printing the File Separators
          4. Going Further
          5. Summary
          5. Word to Your Mother
          1. How wc Works
          2. Getting Started
            1. Iterating the Files
            2. Writing and Testing a Function to Count File Elements
          3. Solution
            1. Counting the Elements of a File or STDIN
            2. Formatting the Output
          4. Going Further
          5. Summary
          6. Den of Uniquity
          1. How uniq Works
          2. Getting Started
            1. Defining the Arguments
            2. Testing the Program
            3. Processing the Input Files
          3. Solution
          4. Going Further
          5. Summary
          7. Finders Keepers
          1. How find Works
          2. Getting Started
            1. Defining the Arguments
            2. Validating the Arguments
            3. Finding All the Things
          3. Solution
          4. Conditionally Testing on Unix Versus Windows
          5. Going Further
          6. Summary
          8. Shave and a Haircut
          1. How cut Works
          2. Getting Started
            1. Defining the Arguments
            2. Parsing the Position List
            3. Extracting Characters or Bytes
            4. Parsing Delimited Text Files
          3. Solution
            1. Selecting Characters from a String
            2. Selecting Bytes from a String
            3. Selecting Fields from a csv::StringRecord
            4. Final Boss
          4. Going Further
          5. Summary
          9. Jack the Grepper
          1. How grep Works
          2. Getting Started
            1. Defining the Arguments
            2. Finding the Files to Search
            3. Finding the Matching Lines of Input
          3. Solution
          4. Going Further
          5. Summary
          10. Boston Commons
          1. How comm Works
          2. Getting Started
            1. Defining the Arguments
            2. Validating and Opening the Input Files
            3. Processing the Files
          3. Solution
          4. Going Further
          5. Summary
          11. Tailor Swyfte
          1. How tail Works
          2. Getting Started
            1. Defining the Arguments
            2. Parsing Positive and Negative Numeric Arguments
            3. Using a Regular Expression to Match an Integer with an Optional Sign
            4. Parsing and Validating the Command-Line Arguments
            5. Processing the Files
            6. Counting the Total Lines and Bytes in a File
            7. Finding the Starting Line to Print
            8. Finding the Starting Byte to Print
            9. Testing the Program with Large Input Files
          3. Solution
            1. Counting All the Lines and Bytes in a File
            2. Finding the Start Index
            3. Printing the Lines
            4. Printing the Bytes
            5. Benchmarking the Solution
          4. Going Further
          5. Summary
          12. Fortunate Son
          1. How fortune Works
          2. Getting Started
            1. Defining the Arguments
            2. Finding the Input Sources
            3. Reading the Fortune Files
            4. Randomly Selecting a Fortune
            5. Printing Records Matching a Pattern
          3. Solution
          4. Going Further
          5. Summary
          13. Rascalry
          1. How cal Works
          2. Getting Started
            1. Defining and Validating the Arguments
            2. Writing the Program
          3. Solution
          4. Going Further
          5. Summary
          14. Elless Island
          1. How ls Works
          2. Getting Started
            1. Defining the Arguments
            2. Finding the Files
            3. Formatting the Long Listing
            4. Displaying Octal Permissions
            5. Testing the Long Format
          3. Solution
          4. Notes from the Testing Underground
          5. Going Further
          6. Summary
          Epilogue
          Index
          About the Author
          想要看這本的,添加微信studyingJava免費(fèi)領(lǐng)取





          推薦閱讀

          60 個(gè)神級(jí) VS Code 插件!

          微信內(nèi)測(cè)版搶先體驗(yàn),可發(fā) 4K 無(wú)損視頻

          豆瓣上最受關(guān)注的 10 本書(shū)(附下載)

          這 5 本書(shū),給你一次徹底讀懂 Spring 的機(jī)會(huì)

          下載!Java 編程必讀書(shū)籍!

          瀏覽 28
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  欧美成人一区二区三区四区 | 国产色情性黄 片Av网站 | 婷婷丁香五月天欧美 | 免费a视频在线观看 | 特级西西444www大胆高清图片 |