Expand description
§nebucloud-xds
Production-ready xDS control plane library for Rust.
This crate provides a complete implementation of the xDS protocol for building Envoy control planes. It supports:
- State-of-the-World (SotW) xDS protocol
- Delta xDS protocol (incremental updates)
- Aggregated Discovery Service (ADS)
- Individual xDS services (CDS, LDS, RDS, EDS, SDS)
§Quick Start
use nebucloud_xds::prelude::*;
use std::sync::Arc;
// Create a cache
let cache = Arc::new(ShardedCache::new());
// Build a snapshot for a node
let snapshot = Snapshot::builder()
.version("v1")
.build();
// Set snapshot
cache.set_snapshot(NodeHash::from_id("node-1"), snapshot);
// Create server
let _server = XdsServer::builder()
.cache(cache)
.enable_sotw()
.build()?;§Architecture
This library is organized into several crates:
xds-core- Core types, traits, and error handlingxds-cache- Snapshot cache with watch notificationsxds-server- gRPC server implementationxds-types- Generated protobuf types
This crate (nebucloud-xds) re-exports all public APIs for convenience.
§Design Principles
- No panics in library code - All errors are returned as
Result - No locks held across await points - Uses DashMap and careful design
- Type-safe resources - Generic
Resourcetrait with registry - Observable - Built-in metrics and tracing support
§Features
full- Enable all features (default)sotw- State-of-the-World protocoldelta- Delta xDS protocolcompression- Response compression
Re-exports§
pub use xds_cache as cache;pub use xds_core as core;pub use xds_server as server;pub use xds_types as types;