AXCP Rust SDK
Official Rust implementation of the Adaptive eXchange Context Protocol (AXCP) client SDK.
Features
- Async/await API with
tokio
- Telemetry data collection and batching
- Configurable timeouts and retry policies
- Comprehensive error handling with
thiserror
- Built-in metrics and tracing with
tracing
- Multiple TLS backends (native-tls or rustls)
- WebSocket support for real-time communication
Installation
Add this to your Cargo.toml
:
[]
= "0.1.0-alpha.1"
# For async runtime (if not already in your project)
= { = "1.0", = ["full"] }
Feature Flags
default
: Usesnative-tls
for TLSrustls
: Userustls
instead ofnative-tls
dev
: Include development dependencies for testing
[]
= { = "0.1.0-alpha.1", = false, = ["rustls"] }
Usage
use *;
use Error;
async
Configuration
The ClientConfig
struct supports the following options:
base_url
: The base URL of the AXCP server (default:http://localhost:8080
)api_key
: Optional API key for authenticationtimeout_secs
: Request timeout in seconds (default: 30)enable_telemetry
: Whether to enable telemetry collection (default:true
)
Testing
Run the tests with:
License
Apache 2.0