Skip to main content

Rust — raw HTTP today, native crate planned

Native client status: PLANNED

There is no published Rust crate yet — nothing on crates.io, and no packages/sdk-rust/ directory exists in the repo. Today you get full parity through three real surfaces: the terminal CLI (/cli/), raw HTTP (the wire format below — what every client wraps), and zeq.py (Python — single file, fetched from any node). When a native crate ships it will wrap exactly this wire format, so code written against HTTP today won't change semantically.

Get the CLI (recommended first install)

Every node serves the terminal CLI with a sha256-pinned installer — the fastest way onto the framework:

curl -fsSL https://zeqstate.com/install.sh | sh # any node works as the origin
zeq tutorial # guided: account → machine → first compute → verify

Full install notes + the complete command reference: /cli/.

Compute over raw HTTP

Rust's standard library has no HTTP client, so use any HTTP crate you already trust — the example below uses ureq (blocking, minimal). Compile-ready:

# Cargo.toml
[dependencies]
ureq = { version = "2", features = ["json"] }
serde_json = "1"
use serde_json::{json, Value};

fn main() -> Result<(), Box<dyn std::error::Error>> {
let key = std::env::var("ZEQ_KEY").expect("set ZEQ_KEY");

let res: Value = ureq::post("https://zeqapi.com/api/zeq/compute")
.set("Authorization", &format!("Bearer {key}"))
.send_json(json!({
"operators": ["KO42", "QM5", "GR40"],
"domain": "cross",
"inputs": { "t": 0 }
}))?
.into_json()?;

println!("{} {} ± {}", res["value"], res["unit"], res["uncertainty"]);
println!("zeqProof: {}", res["zeqProof"]);
println!("explorer: {}", res["explorer_url"]);
Ok(())
}

The public pulse needs no key: GET https://zeqapi.com/api/zeq/pulse.

The response's compliance field is the ZeqCompliance v1 envelope — the 13-standard regulatory record returned on every call. Every result also carries signed — an Ed25519-signed claim (claim + signature + public_key) verifiable offline by anyone, or by POSTing the block to any node's public /api/attest. Or pipe the whole envelope to the CLI: … | zeq verify -.

Why Rust here

  • Embedded firmware. The wire contract is plain JSON over HTTPS, so the same calls work from constrained targets that sit alongside the Embedded C observer agent.
  • Aerospace flight software. Strict typed parsing (serde) of the envelope means parse failures surface at the boundary — DO-178C tool-qualification audits get the same trace boolean as every other path.
  • Server-side throughput. Swap ureq for an async client and one process handles thousands of in-flight compute calls.

Compose with

Status & source

  • Native Rust crate: planned — pending the self-hosted package-registry decision; no crate name is published.
  • The wire contract it will wrap is live today and documented in full at HTTP / curl and the API reference.