dink-sdk
Rust SDK for the Dink edge mesh platform.
Dink connects edge devices to cloud services over NATS using JSON-based RPC. This crate provides the client libraries and traits needed to build edges and centers in Rust.
Quick Start
[]
= "0.1"
Edge Worker
use ;
use Arc;
// Implement a generated service trait
;
async
Set DINK_EDGE_KEY (or DINK_API_KEY) and DINK_SERVER_URL environment variables.
Center Client
use ;
async
Code Generation
Generate typed Rust clients and handlers from .proto service definitions:
This produces:
types.rs— Rust structs for all proto messages{service}_dink.rs— Server trait, Client struct, Handler dispatch, ServiceDefinition const
Features
- Edge client — connect, expose services, peer/group RPC, presence lifecycle
- Center client — call edges, discover, stream, key management
- Code generation — typed clients and handlers from proto definitions
- Streaming — server-streaming RPC with cancel support
- Auth — NATS token auth with edge key parsing (legacy + base64 format)
License
MIT