Skip to main content

Crate sdaas_rs

Crate sdaas_rs 

Source
Expand description

§SDaaS Rust SDK

Official Rust SDK for SDaaS — Semantic Delta as a Service.

A clean, async-first Rust SDK for computing powerful text deltas with semantic understanding.

§Features

  • Fully Async - Built on tokio and reqwest
  • 🔐 Secure - X-API-Key authentication with rustls-tls
  • 📊 Delta Computation - Compute text diffs with compression metrics
  • Key Validation - Check tier, quota, and rate limits
  • 🛡️ Type-Safe - Full serde serialization

§Quick Start

use sdaas_rs::Client;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new(
        "your-api-key",
        "https://saas-core-production.up.railway.app"
    );

    // Compute delta
    let delta = client
        .compute_delta("Hello", "Hello World")
        .await?;

    println!("Delta: {} operations", delta.delta.len());
    println!("Compression: {:.1}%", delta.compression_ratio * 100.0);

    // Validate key
    let validation = client.validate_key().await?;
    println!("Tier: {}", validation.key.tier);

    Ok(())
}

Re-exports§

pub use client::Client;
pub use types::DeltaOp;
pub use types::DeltaRequest;
pub use types::DeltaResponse;
pub use types::KeyValidation;
pub use types::ValidationResponse;

Modules§

client
types

Enums§

Error
Error types for the SDaaS SDK

Type Aliases§

Result