Zum Hauptinhalt springen

C++ SDK — zeq

Header-only C++17 client. Two dependencies: libcurl for HTTPS and nlohmann::json for parsing. Same wire format as every other SDK.

Install

# vcpkg
vcpkg install zeq

# or just drop the header into your project
curl -O https://raw.githubusercontent.com/hulyasmath/zeq-framework/main/packages/sdk-cpp/include/zeq.hpp

Build line for the embedded variant:

c++ -std=c++17 -O2 your_app.cpp -lcurl -lcrypto -o your_app

First call — public, no key

#include <zeq.hpp>
#include <iostream>

int main() {
auto p = zeq::pulse();
std::cout << "Zeqond " << p.zeqond
<< " · phase " << p.phase
<< " · R(t) " << p.r_t << '\n';
}

Authed call — zeq::compute()

#include <zeq.hpp>

int main() {
zeq::Client zeq{ std::getenv("ZEQ_KEY") };

auto r = zeq.compute({
.operators = { "KO42", "QM5", "GR40" },
.domain = "cross",
.inputs = nlohmann::json{ { "t", 0 } },
});

std::cout << r.value << ' ' << r.unit
<< " ± " << r.uncertainty << '\n';
std::cout << "zeqProof: " << r.zeq_proof << '\n';
std::cout << "compliance: " << r.compliance.dump() << '\n';
}

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 zeq::compute(...) cross-domain physics every frame; the HulyaPulse 1.287 Hz tick aligns naturally with the engine's frame budget.
  • High-frequency trading desks. Sub-millisecond round-trips on the same compute envelope SOX/SOC 2 auditors already trust.

Compose with

Source