C++ — raw HTTP today, native client planned
There is no published C++ package yet — nothing on vcpkg or Conan, and no packages/sdk-cpp/ 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 client ships it will wrap exactly this wire format, so code written against HTTP today won't change semantically.
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 — libcurl
C++ has no standard HTTP client; libcurl is the de-facto standard and ships on every platform. Compile-ready:
// g++ -std=c++17 zeq_compute.cpp -lcurl && ZEQ_KEY=... ./a.out
#include <curl/curl.h>
#include <cstdlib>
#include <iostream>
#include <string>
static size_t collect(char* p, size_t s, size_t n, void* out) {
static_cast<std::string*>(out)->append(p, s * n);
return s * n;
}
int main() {
const char* key = std::getenv("ZEQ_KEY");
const std::string body =
R"({ "operators": ["KO42", "QM5", "GR40"], "domain": "cross", "inputs": { "t": 0 } })";
std::string resp;
CURL* curl = curl_easy_init();
if (!curl) return 1;
curl_slist* hdrs = nullptr;
hdrs = curl_slist_append(hdrs,
("Authorization: Bearer " + std::string(key ? key : "")).c_str());
hdrs = curl_slist_append(hdrs, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://zeqapi.com/api/zeq/compute");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, hdrs);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, body.c_str());
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, collect);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &resp);
const CURLcode rc = curl_easy_perform(curl);
curl_slist_free_all(hdrs);
curl_easy_cleanup(curl);
if (rc != CURLE_OK) { std::cerr << curl_easy_strerror(rc) << "\n"; return 1; }
std::cout << resp << "\n"; // full envelope: value, unit, signed, compliance, zeqProof …
return 0;
}
Parse with nlohmann::json or any JSON library — the envelope is plain JSON. 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 C++ here
- Industrial control systems. Compose against the same entangled state that an Embedded C observer agent writes to. Both speak the same JSON wire contract.
- Game engines and physics. A long-running game-engine worker can post a compute every frame; the HulyaPulse 1.287 Hz tick aligns naturally with the engine's frame budget.
- Low-latency desks. The same compute envelope SOX/SOC 2 auditors already trust, from the language your hot path is written in.
Compose with
- Embedded C observer agent — the device-side companion.
- Hosted API reference — every route, body, response, error.
- HTTP / curl — the full wire-format walkthrough (solve, multibody, attest).
Status & source
- Native C++ client: planned — pending the self-hosted package-registry decision; no package name is reserved.
- The wire contract it will wrap is live today and documented in full at HTTP / curl and the API reference.