Getting started

Introduction

What the plugin does, its two packages and where it runs.

A Tauri 2 plugin for real-time messaging with a Centrifugo server. The client runs in Rust on the official SDK centrifuge-client; your frontend drives it with Tauri commands and gets everything back as centrifugo:* Tauri events.

  • Real networks: reconnects with backoff, ping/pong liveness, wake-from-sleep detection, OS proxy settings and trust store — all from the SDK.
  • Transports: WebSocket with JSON or Protobuf, optional HTTP-streaming fallback, custom headers.
  • Recovery: recoverable and positioned subscriptions, resume from a saved stream position, fossil delta compression.
  • Tokens: connection and subscription JWTs, refreshed before they expire by asking your frontend.
  • Operations: publish, RPC, async send, history, presence and presence stats.
  • Rust backend: the same client from Rust, and the SDK itself re-exported.
PlatformSupported
Windows · macOS · Linux✅
Android✅ (wss:// with Mozilla roots, see Android)
iOS✅

Server: Centrifugo v4+ (client protocol v2). HTTP streaming needs v5+ with http_stream enabled. Tested against Centrifugo v5.4.9; see Centrifugo server.

The plugin is two packages: the Rust crate tauri-plugin-centrifugo and the npm package tauri-plugin-centrifugo-api.

Coming from 0.1? The client is now the official SDK; a few calls are deprecated or no longer supported. See Deprecations and the changelog.