Topics
| Installation1 | The crate links the UCall library, which its build script compiles through CMake, so building needs CMake and a C++20 compiler. |
|---|---|
| Quickstart | A server answers on one or more interfaces, and a client calls it; neither starts a thread. |
| Serving45 | Server::new takes the interfaces to answer on, and Server::withoptions also takes ServerOptions: the Backend, an optional CPUClass ceiling, a Log sink and a StatsD endpoint in Metrics. |
| Requests59 | A handler receives each Request by value. |
| Files and Streams6 | Handlers run on the polling thread, so a reply or a pull that finishes later runs on a worker: Request::detach hands the request over as a DetachedRequest, which reads and replies like a Request and alone has the three verbs below. |
| Batches8 | A 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. |
| Calling24 | A Client submits calls without driving the network, and polls to drive them and collect what finished. |
| Noise Keys5 | Interfaces and calls can run over the Noise protocol instead of plain TCP, authenticating both sides by 32-byte Curve25519 static keys. |
| Errors4 | Every fallible call answers ucall::Result, whose Error carries the Status the library reported and a static message beside it, so nothing allocates on the failure path. |
| Threads and Polling2 | The crate starts no threads and needs no async runtime: every callback runs on a thread the application lent to a polling call. |
| Design | The crate is a thin layer over UCall's native library, and every rule below follows from that. |