Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

Welcome to the dnet book.

dnet is a unified messaging abstraction library for Rust that makes it easy to send and receive messages over multiple transport protocols with a consistent async interface.

The core idea behind dnet is to delegate message encoding and decoding to serde. This allows library users to focus on the networking logic of their application instead of spending time on low-level details of the specific transport protocol used to send messages.

Security

Read the security section first, before using the dnet crate.

What you will learn

This book is designed to help you understand:

  • What dnet is and when to use it
  • How to work with common transports such as TCP, UDP, QUIC, WebSocket, MessagePort and transport for communication with web workers
  • How to extend dnet with new transports or custom codecs
  • How to implement RPC over dnet transports

Getting started

If you are new to dnet, it’s best to start by learning the core concepts of dnet and then explore the examples.