Skip to main content
Official Rust SDK for Westyx Nexus - the centralised secrets, feature flags, and config service.

Highlights

  • Async-first - tokio + reqwest, TLS via rustls, so no OpenSSL system dependency
  • Cache reads stay synchronous - they read in-memory state, so there is no .await to write and nothing to block on
  • blocking feature - the same surface synchronously for applications with no runtime of their own; it works even inside another runtime
  • tracing diagnostics - spans and structured events, a no-op until you install a subscriber; a startup summary names what the first sync delivered, and no secret value or credential is ever recorded
  • Clone is cheap (Arc bump) - pass clones freely to tasks and to axum/actix handlers
  • Thread-safe TTL cache - one snapshot shared by every clone; concurrent reads on a stale snapshot trigger a single coalesced refresh; sync_errors() lists what the server did not deliver
  • ETag/304 support - nothing is downloaded when nothing has changed
  • SSE live updates via run_stream() - a tokio task with a connect deadline and an idle deadline that resets on every byte; falls back to TTL polling after 3 transport errors and retries on a schedule
  • Public-key vs secret-key access control - public-key clients get PublicKeyRestricted before any network call, and both secret accessors refuse a frontend-kind service
  • Owner-only file-type secrets - materialised 0600 into a private 0700 directory per client; removed on close() or when the last clone is dropped
  • Pattern-match on NexusError - idiomatic enum variants, #[non_exhaustive], no string matching; status() and code() on every API error, and a switched-off environment named as EnvironmentDisabled
  • Workload Identity Federation - Kubernetes / AWS IRSA / GCP / Azure auto-detected, plus AWS IAM (aws_iam) for ECS/Fargate/Lambda/plain EC2 behind a feature flag, a developer provider for local machines, and a custom credential source for everything else
  • Write API - set_secret, delete_secret, delete_secret_version (secret key only)
  • A/B testing - evaluate_ab; AbAddonNotAvailable when the add-on is not active
  • OpenFeature - the separate westyx-nexus-openfeature crate wraps an existing client

Latest release

v0.17.0-beta.2 (2026-11-19) on crates.io - see the version history. The crate is on the beta track: the public surface is settling release by release, and graduating to stable is a decision to take once it has held still for one.

Documentation

Installation

Add the crate, pick your features, and check the Rust version floor.

Configuration

Every option, its default, and what is rejected at construction.

API reference

Every method, with the errors it can return.

Caching behaviour

TTL, ETag, coalesced refreshes, and cleanup.

SSE live updates

Deadlines, reconnection, and the control events.

Workload identity

Keyless authentication on Kubernetes, AWS, GCP and Azure.

Logging

tracing, the startup summary, and what is never recorded.

Error handling

Every NexusError variant and the shared status mapping.

OpenFeature

The provider crate and its resolution mapping.

Version history

What changed in each release, and how to migrate.