Network Programming with Rust

Abhishek Chanda

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

商品描述

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 中執行網路操作

  • 開發一個完全功能的網頁伺服器,快速獲得所需技能

書籍描述


Rust 近年來逐漸成為最重要的新程式語言之一。像 C 或 C++ 一樣,Rust 讓開發者能夠撰寫低階程式碼,使 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 專案中使用外部套件