Haystack HTTP and WebSocket client library.
Provides [HaystackClient] for communicating with Project Haystack servers
using the standard REST API and optional WebSocket transport for real-time watches.
Features
- SCRAM SHA-256 authentication — Automatic handshake on connect
- HTTP + WebSocket — HTTP for standard ops, WebSocket for watch subscriptions
- mTLS — Mutual TLS via [
tls::TlsConfig] for certificate-based auth - Zinc wire format — Default encoding for fastest serialization
- 30+ Haystack ops — about, read, nav, hisRead, hisWrite, pointWrite, watchSub, watchPoll, watchUnsub, invokeAction, defs, libs, and more
Quick Start
use HaystackClient;
# async
Error Handling
All operations return Result<_, ClientError>. See [ClientError] for the
error variants covering authentication, transport, codec, and timeout failures.