Guides
Rust SDK
Use pole_rust for proxyless discovery, configuration, and governance.
The Rust SDK (pole_rust) connects applications to Lattice Hub without a data-plane proxy. Clients talk to discovery and config gRPC ports and evaluate routing/load-balancing locally.
Install
[dependencies]
pole_rust = "0.2.0"Requires Rust >= 1.63.0.
Configuration
Defaults to ./pole.yaml / ./pole.yml, or POLE_RUST_CONFIG. Point global.serverConnectors.discover at 8091 and config at 8093. See tests/data/default-config.yml in the SDK repo.
Minimal discovery flow
Repository examples:
examples/discover.rs— Provider register, Consumer get/watch/get_one_instanceexamples/config.rs— create, publish, and watch configuration files
let ctx = Arc::new(SDKContext::default()?);
let provider = new_provider_api_by_context(ctx.clone())?;
let consumer = new_consumer_api_by_context(ctx)?;
// provider.register(...).await
// consumer.get_one_instance(...).awaitVerification
cargo test
cargo run -p e2e_tests -- \
--console-url http://127.0.0.1:8080 \
--client-addr 127.0.0.1:8091