aboutsummaryrefslogtreecommitdiff
path: root/crates/arti-rpc-client-core/src/util.rs
Commit message (Collapse)AuthorAgeFilesLines
* rpclib: Implement Display for Utf8CString.Nick Mathewson2024-09-251-0/+7
|
* rpclib: Use JsonValue to re-encode requests.Nick Mathewson2024-08-071-0/+12
| | | | | | | | As with responses, we previously used a strategy that could have failed in the future, if we forgot to add an "unexpected_fields" member to one of our structs. Closes #1512.
* rpc: Make ObjectId hold a Utf8CString internally.Nick Mathewson2024-08-061-1/+58
| | | | This will enable us to return it to FFI callers as a nul-terminated string.
* Apply safety-related suggestions from DizietNick Mathewson2024-07-311-1/+1
|
* rpc: Explain _why_ utf-8 in Utf8CString is a safety requirement.Nick Mathewson2024-07-311-0/+6
| | | | (and to what extent)
* Rename Utf8CStr=>Utf8CStringNick Mathewson2024-07-311-6/+6
|
* rpclib: _Sketch_ of string API.Nick Mathewson2024-07-311-13/+3
| | | | | | | | | | | | | In this API, borrowed strings are `const char *`, and owned strings are `ArtiRpcStr *`. You can get the former from the latter with `arti_rpc_str_get()`, which returns a `const char *` in hopes that you will neither modify nor free() that `const char *` (Note that there are no places where string ownership needs to be passed into this library; and at present, there is only one case where it is passed out. I do not anticipate that we will need to do intake of owned strings. We will probably need to return these in a few more cases as we add more API surface.)
* rpc: Initial core of an FFI interface.Nick Mathewson2024-07-311-0/+25
| | | | | | | | | This only covers the absolute minimal API in order to launch a connection and run simple requests, and it doesn't document anything nearly well enough. Nonetheless I think it's good enough for an initial review, to make sure that we've got the basics right (as well as a general consensus on the error handling API, naming, and so forth).
* RPC: Make message types able to be CStr or str.Nick Mathewson2024-07-311-0/+39
| | | | (Internally, it is a boxed CStr that is always UTF-8.)
* WIP: Lower and middle levels of Arti rpc core.Nick Mathewson2024-07-161-0/+17