Rust SDK — zeq
A tokio-native, serde-JSON Rust client. Zero unsafe. Same wire format as every other SDK — receipts from a Rust call round-trip byte-for-byte against the TypeScript, Python, Go, JavaScript, and HTTP forms.
Install
# Cargo.toml
[dependencies]
zeq = "1.287"
tokio = { version = "1", features = ["full"] }
First call — public, no key
use zeq::pulse;
#[tokio::main]
async fn main() -> Result<(), zeq::Error> {
let p = pulse().await?;
println!("Zeqond {} · phase {:.3} · R(t) {}",
p.zeqond, p.phase, p.r_t);
Ok(())
}
pulse() hits GET /api/zeq/pulse. No authentication, sub-30 ms response, ideal for embedded telemetry running on the 1.287 Hz system clock.
Authed call — zeq.compute()
use zeq::{ZeqClient, Compute};
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), zeq::Error> {
let zeq = ZeqClient::from_env()?; // reads $ZEQ_KEY
let r = zeq.compute(Compute {
operators: vec!["KO42".into(), "QM5".into(), "GR40".into()],
domain: Some("cross".into()),
inputs: json!({ "t": 0 }),
}).await?;
println!("{} {} ± {}", r.value, r.unit, r.uncertainty);
println!("zeqProof: {}", r.zeq_proof);
println!("compliance: {:?}", r.compliance.standards_aligned);
Ok(())
}
Every response carries the same ZeqState + ZeqProof + ZeqCompliance v1 envelope as every other SDK.
Why Rust here
- Embedded firmware. The
no_stdfeature flag drops the runtime, so the same crate compiles for ARM Cortex-M targets that run alongside the Embedded C observer agent. - Aerospace flight software.
serde-driven JSON means strict parse errors at compile time — DO-178C tool-qualification audits get the same trace boolean as every other path. - Server-side throughput. Async by default. One client handles thousands of in-flight
computecalls.
Compose with
- Hosted API reference — every endpoint the crate wraps.
- Observer Agents — Embedded C — pair with Rust on the same device.
- ZeqCompliance v1 — the envelope every call returns.
Source
- crates.io:
zeq - GitHub:
packages/sdk-rust/