SDaaS Rust SDK (sdaas-rs)
Official Rust SDK for SDaaS - Semantic Delta as a Service.
Compute powerful text deltas with semantic understanding, compression info, and enterprise-grade reliability.
Features
- ✨ Fully Async - Built on
tokioandreqwest - 🔐 Secure - X-API-Key authentication with rustls-tls
- 📊 Delta Computation - Compute text diffs with compression metrics
- ✅ Key Validation - Check tier, quota, and rate limits in real-time
- 🛡️ Type-Safe - Full serde serialization with type safety
- 📚 Well Documented - Comprehensive examples and API docs
- 🚀 Production Ready - Battle-tested error handling macros", "rt-multi-thread"] }
Or use `cargo add`:
```bash
cargo add sdaas-rs tokio
## Installation
Add to your `Cargo.toml`:
```toml
[dependencies]
sdaas-rs = "0.1"
tokio = { version = "1", features = ["full"] }
Quick Start
Compute Delta
use Client;
async
Validate API Key
use Client;
async
Running Examples
Try the included examples:
# Basic delta computation
# API key validation
;
);
);
);
))
}
API Reference
Client
Methods
new(api_key: &str, base_url: &str) -> Self- Create new clientcompute_delta(source: &str, target: &str) -> Result<DeltaResponse>- Compute text deltavalidate_key() -> Result<ValidationResponse>- Validate API key and get quota infoset_api_key(api_key: &str)- Update API keybase_url() -> &str- Get current base URL
DeltaResponse
DeltaOp
ValidationResponse
;
async
API Reference
Client Methods
new(api_key, base_url) -> Self- Create new clientcompute_delta(source, target) -> Result<DeltaResponse>- Compute text deltavalidate_key() -> Result<ValidationResponse>- Validate and get quota infoset_api_key(api_key)- Update API keybase_url() -> &str- Get current base URL
Response Types
// Delta computation result
// API key validation result
Error Types
Development
Prerequisites
- Rust 1.70+
- Cargo
Build & Test
# Build
# Run tests
# Check code
# Generate docs
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
License
Licensed under the MIT License - see LICENSE file for details.
Getting Help
Related
-
API Documentation println!("Operations: {}", delta.delta.len()); println!("Size: {} bytes", delta.size_bytes); println!("Ratio: {:.2}%", delta.compression_ratio * 100.0);
Ok(()) }
## License
MIT
## Support
For issues and questions, visit the [GitHub repository](https://github.com/yourusername/sdaas-rs).