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

dice-rs is a Rust library and toolkit for controlling GoDice - physical Bluetooth dice that communicate over Bluetooth Low Energy (BLE).

Motivation

GoDice are physical dice with embedded LEDs, an accelerometer, and a BLE radio. They use the Nordic UART Service (NUS) profile for communication. The official APIs from Particula are in JavaScript and Python. dice-rs brings native Rust support with an idiomatic async API, type-safe domain model, and a trait-based transport layer for testability.

Scope

The workspace provides five crates:

  • dice-rs - core library with domain types, BLE transport, and a high-level service API
  • dice-rs-cli - command-line tool for quick interactions
  • dice-rs-controller - GTK 4 desktop application with 3D dice rendering
  • dice-rs-ws - WebSocket server for network-accessible dice events
  • yatzy - Kniffel (Yatzy) game with GTK 4 UI, AI opponent, and GoDice integration (see Yatzy)

Where to Get Help