template <typename handle_type_,
void(*)(handle_type_) free_>
class owner The interface is a thin layer over UCall’s native library, and every rule below follows from that.
- Verbs share one name across languages.
take_call,take_calls,take_batch,take_batches,submitandtake_completedname the same calls in C++, Go, Python and Rust. - Blocking stays simple, deferring stays symmetric. A reply that is final on return answers a
status_t, and one that may finish later answers adeferredthatwaits, is awaited throughco_await call.wait(loop), or waits as it is destroyed, as Rust’sDeferreddoes when dropped. - Ownership is a type, not a flag. A reply takes its
request_t, a destroyed request answers 500, aresponse_tfrees itself, and adeferrednever moves, so the stack or the coroutine frame holding it outlives the call. - Handlers stay the caller’s, never boxed. A function or a member is a template argument and an object or a callable with state stays the caller’s until the server or client is destroyed, so registration copies no closure, and every handler is
noexcept, as no fault can unwind through the library. - Polling allocates nothing. Blocking verbs keep their outcome on the stack, a deferred call keeps it inside itself, and an awaiter posts two words, a function and its own address, into the caller’s scheduler, as Rust’s waker does. A server and a client hold their handles alone: the library hands each callback its server, and a blocking call takes its own completion out of the library’s queue.
- No life of its own. The interface starts no threads, keeps no global state and needs no runtime, so it drops into any threading model.
| Path | Rust | C++ |
|---|---|---|
| Blocking verb | 0 | 0 |
| Each handler call | 0 | 0 |
| Deferred reply or pull | 0 | 0, the deferred lives in the caller |
| Await | 0 | 0 in the binding |
| Route registration | 1 Box | 0 |
| Client start | call tables | 0 |