Learning Rust: A comprehensive guide to writing Rust applications

Paul Johnson, Vesa Kaihlavirta

  • 出版商: Packt Publishing
  • 出版日期: 2017-11-24
  • 售價: $1,860
  • 貴賓價: 9.5$1,767
  • 語言: 英文
  • 頁數: 308
  • 裝訂: Paperback
  • ISBN: 1785884301
  • ISBN-13: 9781785884306
  • 相關分類: Rust 語言
  • 下單後立即進貨 (約3~4週)

相關主題

商品描述

Key Features

  • Get started with the language to build scalable and high performance applications
  • This book will help C#/C++ developers gain better performance and memory management
  • Discover the power of Rust when developing concurrent applications for large and scalable software

Book Description

Rust is a highly concurrent and high performance language that focuses on safety and speed, memory management, and writing clean code. It also guarantees thread safety, and its aim is to improve the performance of existing applications. Its potential is shown by the fact that it has been backed by Mozilla to solve the critical problem of concurrency.

Learning Rust will teach you to build concurrent, fast, and robust applications. From learning the basic syntax to writing complex functions, this book will is your one stop guide to get up to speed with the fundamentals of Rust programming. We will cover the essentials of the language, including variables, procedures, output, compiling, installing, and memory handling.

You will learn how to write object-oriented code, work with generics, conduct pattern matching, and build macros. You will get to know how to communicate with users and other services, as well as getting to grips with generics, scoping, and more advanced conditions. You will also discover how to extend the compilation unit in Rust.

By the end of this book, you will be able to create a complex application in Rust to move forward with.

What you will learn

  • Set up Rust for Windows, Linux, and OS X
  • Write effective code using Rust
  • Expand your Rust applications using libraries
  • Interface existing non-Rust libraries with your Rust applications
  • Use the standard library within your applications
  • Understand memory management within Rust and speed efficiency when passing variables
  • Create more complex data types
  • Study concurrency in Rust with multi-threaded applications and sync threading techniques to improve the performance of an application problem

About the Author

Paul Johnson has been writing software since the early 1980s on machines ranging from the ZX81 and servers to his trusty Mac, and has used more languages than he can remember. He is a qualified scuba diver and college lecturer. Paul lives with his wife, kids, and pets, and listens to an inordinate amount of rock and metal on Primordial Radio. This is his third book for Packt.

Vesa Kaihlavirta has been programming since he was 5, beginning with C64 Basic. His main professional goal in life is to increase awareness about programming languages and software quality in all industries that use software. He's an Arch Linux Developer Fellow and has been working in the telecom and financial industry for over a decade. Vesa lives in Central Finland, in Jyväskylä. Vesa worked on the final editing phase of Learning Rust.

Table of Contents

  1. Introducing & Installing Rust
  2. Variables
  3. Input and Output
  4. Conditions, Recursion and Loops
  5. Remember, Remember
  6. Creating your own Rust applications
  7. Matching and Structures
  8. The Rust Application Lifetime
  9. Introducing Generics and Traits
  10. Creating your own Crate
  11. Concurrency in Rust
  12. Now it’s your turn!
  13. The standard library
  14. Foreign Function Interfaces

商品描述(中文翻譯)

主要特點



  • 使用這種語言來建立可擴展且高效能的應用程式

  • 本書將幫助 C#/C++ 開發人員提升效能和記憶體管理能力

  • 在開發大型且可擴展軟體的並行應用程式時,發現 Rust 的威力

書籍描述


Rust 是一種高度並行且高效能的語言,專注於安全性、速度、記憶體管理和撰寫乾淨的程式碼。它也保證執行緒安全,旨在改善現有應用程式的效能。Mozilla 的支持證明了它的潛力,用以解決並行性的重要問題。


學習 Rust 將教你如何建立並行、快速且堅固的應用程式。從學習基本語法到撰寫複雜函式,本書是你學習 Rust 編程基礎的一站式指南。我們將涵蓋語言的基本要素,包括變數、程序、輸出、編譯、安裝和記憶體處理。


你將學習如何撰寫物件導向程式碼,使用泛型、進行模式匹配和建立巨集。你將了解如何與使用者和其他服務進行通訊,並熟悉泛型、作用域和更高級的條件。你還將發現如何擴展 Rust 的編譯單元。


通過閱讀本書,你將能夠在 Rust 中創建一個複雜的應用程式,並繼續前進。

你將學到什麼



  • 在 Windows、Linux 和 OS X 上設置 Rust

  • 使用 Rust 撰寫有效的程式碼

  • 使用庫擴展你的 Rust 應用程式

  • 將現有的非 Rust 库與你的 Rust 應用程式進行接口

  • 在應用程式中使用標準庫

  • 了解 Rust 中的記憶體管理和變數傳遞的速度效能

  • 創建更複雜的資料類型

  • 研究 Rust 中的並行性,使用多線程應用程式和同步線程技術來提升應用程式效能

關於作者


Paul Johnson 自 1980 年代初開始撰寫軟體,使用的機器從 ZX81 到他可靠的 Mac,使用的語言超過他能記得的數量。他是一名合格的潛水員和大學講師。Paul 與妻子、孩子和寵物一起生活,並在 Primordial Radio 上聽了大量的搖滾和金屬音樂。這是他為 Packt 寫的第三本書。


Vesa Kaihlavirta 從 5 歲開始就一直在編程,從 C64 Basic 開始。他在生活中的主要職業目標是提高所有使用軟體的行業對編程語言和軟體品質的認識。他是一名 Arch Linux 開發人員,並在電信和金融行業工作了十多年。Vesa 住在芬蘭中部的 Jyväskylä。Vesa 參與了《學習 Rust》的最後編輯階段。

目錄



  1. 介紹和安裝 Rust

  2. 變數

  3. 輸入和輸出

  4. 條件、遞迴和迴圈

  5. 記住、記住

  6. 創建你自己的 Rust 應用程式

  7. 匹配和結構

  8. Rust 應用程式的生命週期

  9. 介紹泛型和特性

  10. 創建你自己的 Crate

  11. Rust 中的並行性

  12. 現在輪到你了!

  13. 標準庫

  14. 外部函式介面