Network Programming with Rust
暫譯: 使用 Rust 進行網路程式設計

Abhishek Chanda

  • 出版商: Packt Publishing
  • 出版日期: 2018-02-28
  • 售價: $2,010
  • 貴賓價: 9.5$1,910
  • 語言: 英文
  • 頁數: 278
  • 裝訂: Paperback
  • ISBN: 1788624890
  • ISBN-13: 9781788624893
  • 相關分類: Rust 語言程式語言
  • 海外代購書籍(需單獨結帳)

商品描述

Key Features

  • Builds a solid foundation in Rust while also indulging in important network programming details
  • Leverage the power of a number of available libraries to perform network operations in Rust
  • Develop a fully functional webserver to gain the skills you need, fast

Book Description

Rust has steadily become one of the most important new programming languages in recent years. Like C or C++, Rust enables developers to write code that is low level enough which makes Rust code fast. And since Rust is memory-safe by design, it does not allow code that can crash on a null pointer exception. These properties make it a natural choice for writing low level networking applications. This book will enable developers to get started with writing networking applications with Rust.

This book will be divided in three main parts that will take you on an exciting journey of building a fully functional webserver. The book starts with a solid introduction to Rust and essential networking concepts. This will lay the foundation and the tone for the entire book. It dives deep into details of using Rust for networking software. Starting with client-server networking using sockets to IPv4/v6, DNS, TCP, UDP, you will also learn about serialising and deserialising data using serde. The book shows how to communicate with REST servers over HTTP and implement asynchronous network programming using Tokio stack. Given the importance of security for modern systems, you will see how Rust supports common primitives like TLS and public key cryptography.

After reading this book, you will be confident to use Rust to build effective networking software.

What you will learn

  • Appreciate why networking is important in implementing distributed systems
  • Write a non-asynchronous echo server over TCP that talks to a client over a network
  • Parse JSON and binary data using parser combinators like nom
  • Write a HTTP client that talks to the server using reqwest
  • Modify an existing Rust HTTTP server and add SSL to it
  • Asynchronous programming support in core Rust
  • How to use external packages in a Rust project

商品描述(中文翻譯)

關鍵特點
- 在 Rust 中建立堅實的基礎,同時深入了解重要的網路程式設計細節
- 利用多個可用的函式庫在 Rust 中執行網路操作
- 開發一個功能完整的網路伺服器,以快速獲得所需的技能

書籍描述
Rust 在近幾年穩步成為最重要的新程式語言之一。像 C 或 C++ 一樣,Rust 使開發者能夠編寫足夠低階的程式碼,這使得 Rust 程式碼執行快速。由於 Rust 在設計上是記憶體安全的,因此不允許會因為空指標異常而崩潰的程式碼。這些特性使其成為編寫低階網路應用程式的自然選擇。本書將使開發者能夠開始使用 Rust 編寫網路應用程式。

本書將分為三個主要部分,帶您踏上構建功能完整的網路伺服器的精彩旅程。本書以對 Rust 和基本網路概念的堅實介紹開始,為整本書奠定基礎和基調。它深入探討使用 Rust 進行網路軟體的細節。從使用套接字的客戶端-伺服器網路到 IPv4/v6、DNS、TCP、UDP,您還將學習如何使用 serde 進行資料的序列化和反序列化。本書展示了如何通過 HTTP 與 REST 伺服器進行通信,並使用 Tokio 堆疊實現非同步網路程式設計。考慮到現代系統對安全性的重視,您將看到 Rust 如何支持 TLS 和公鑰加密等常見原語。

閱讀完本書後,您將能夠自信地使用 Rust 構建有效的網路軟體。

您將學到的內容
- 理解為什麼網路在實現分散式系統中如此重要
- 編寫一個非非同步的 TCP 回音伺服器,與網路上的客戶端進行通信
- 使用解析器組合器如 nom 解析 JSON 和二進位資料
- 編寫一個使用 reqwest 與伺服器通信的 HTTP 客戶端
- 修改現有的 Rust HTTP 伺服器並為其添加 SSL
- 在核心 Rust 中支持非同步程式設計
- 如何在 Rust 專案中使用外部套件