C++

UCall for C++

cmake --build build_release --target ucall_static 1.0.0-rc.1 · b7577426

Ask your coding agent about this page, or add the docs server to it

curl -s 'https://www.unum.cloud/docs/ucall/cpp.md' | claude -p "How would this fit my code?"

Topics

Installation1Build the static library from a checkout; the C++ headers sit over it and need nothing else.
QuickstartA server answers on one or more interfaces, and a client calls it; neither starts a thread.
Serving29server_t::make takes the interfaces to answer on, as an array whose size the compiler knows, and optionally server_options_t: the backend, a CPU class ceiling that caps the picked class rather than demanding one the machine lacks, a log_t sink and a StatsD endpoint.
Requests39A handler receives each request_t by value, owning it.
Files and Streams4Handlers run on the polling thread, so a reply or a pull that finishes later runs in a deferred slot the caller keeps, which the polling thread finishes as it keeps polling.
Batches2A pooled batch endpoint gathers matching requests from every event loop into one queue and hands them to its handler in batches, which suits work that is cheaper per request in bulk, like GPU inference.
Calling26A client_t submits calls without driving the network, and polls to drive them and collect what finished.
Noise Keys5Interfaces and calls can run over the Noise protocol instead of plain TCP, authenticating both sides by 32-byte Curve25519 static keys.
Errors5Every fallible verb answers a status_t, or an expected<T>, a plain pair of a value and its status_t unpacked as auto [value, status], whose value is default-constructed on failure.
Threads and Polling2The interface starts no threads and needs no runtime: every callback runs on a thread the application gave to a polling call.
Design1The interface is a thin layer over UCall's native library, and every rule below follows from that.