summaryrefslogtreecommitdiff
path: root/crates/tor-rpcbase
Commit message (Collapse)AuthorAgeFilesLines
* Bump arti- and tor- crates to 0.23.0Nick Mathewson2024-09-301-3/+3
| | | | | | | | | | | | | | Per our policy, every one of these gets a minor bump. Generated with: ``` for crate in $(./maint/list_crates | grep '^\(tor\|arti\)-' ); do cargo set-version --bump minor -p $crate; done ``` (Note the use of `-` at the end end of the grep pattern to prevent matching the `arti` crate.)
* Merge branch 'msrv-1.77-and-rusqlite-update' into 'main'David Goulet2024-09-261-1/+1
|\ | | | | | | | | Upgrade MSRV to 1.77 , and rusqlite to 0.32.1 See merge request tpo/core/arti!2451
| * Upgrade MSRV to 1.77Nick Mathewson2024-09-251-1/+1
| | | | | | | | This will allow us to upgrade to the latest version of rusqlite.
* | Merge branch 'upgrades-20240925' into 'main'Nick Mathewson2024-09-261-1/+1
|\ \ | |/ |/| | | | | Upgrade dependencies in preparation for next week's releases. See merge request tpo/core/arti!2450
| * Upgrade to derive_more version 1.0.0Nick Mathewson2024-09-251-1/+1
| | | | | | | | | | | | The `derive_more` crate broke backward compatibility with this version, so this change involved quite a few manual fixups. With luck, they'll keep compatibility for some while in the future.
* | Merge branch 'rename_singleton_id' into 'main'Jim Newsome2024-09-251-1/+1
|\ \ | |/ |/| | | | | | | | | rpc: Rename SingletonId to SingleIdResponse Closes #1585 See merge request tpo/core/arti!2448
| * rpc: Rename SingletonId to SingleIdResponseNick Mathewson2024-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | Calling it "singleton" might have suggested that it was using the [singleton pattern](https://en.wikipedia.org/wiki/Singleton_pattern), which it isn't. (Renaming done with rust-analyzer and double-checked with `git grep`.) Closes #1585.
* | rpc: Expose a delegation table in arti:x_list_all_rpc_methodsNick Mathewson2024-09-244-1/+69
| | | | | | | | Closes #1624.
* | rpc: add mandatory delegate-type attribute to Object templateNick Mathewson2024-09-242-3/+12
|/ | | | | | | When specifying a delegation, the template user must also say what type they're delegating to. We're going to use this to document and expose delegations.
* Bump MSRV from 1.70 to 1.75.Wesley Aptekar-Cassels2024-09-161-1/+1
|
* Bump all the unstable tor- and arti- crates to 0.22.0.Gabriela Moldovan2024-09-031-3/+3
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.22.0 done ```
* Fix typosDimitris Apostolou2024-09-031-2/+2
|
* rpcbase: Implement RPC method delegation support.Nick Mathewson2024-08-143-32/+138
| | | | | | | | (Couldn't use Deref here, since we needed to get an Arc.) Only one delegation target per object is permitted for now. This will help with #1523.
* Add a missing incantation to fix doc(cfg=...).Nick Mathewson2024-08-131-0/+1
| | | | Without this, we get a warning when we run `cargo doc`.
* rpcbase: Feature to list the RPC methods and what they apply to.Nick Mathewson2024-08-124-1/+108
|
* rpcbase: Facility for looking up RPC method informationNick Mathewson2024-08-122-5/+43
| | | | | We'll need this to refer to the names of RPC methods as visible to the caller, and to cross-reference them with their related types.
* rpcbase: Expose Invocable type names directly.Nick Mathewson2024-08-121-6/+11
| | | | | | Previously, we exposed them only via `describe_invocable`, which would have required the caller to parse a string in order to find these.
* Bump versions for tor- and arti- crates to 0.21.0Nick Mathewson2024-08-011-3/+3
| | | | | | | | | | This is the result of: ``` for crate in $( ./maint/list_crates |grep '^\(tor\|arti-\)' ); do cargo set-version -p $crate 0.21.0 done ```
* rpc: Remove special conversion for SendUpdateError.Nick Mathewson2024-07-252-10/+6
|
* rpc: Rename the error codes for something like consistency.Nick Mathewson2024-07-251-16/+17
|
* rpc: Remove RpcError data field and use ReportNick Mathewson2024-07-253-88/+31
| | | | | | | | | | | | Per discussion, this field isn't really specified in a way that lets us fill it sensibly at the moment. So for now, we're going to just omit it. Additionally, we said that we'd Report on our errors; this branch changes the implementation of RpcError to do that. Question: Will the blanket implementation for Into<RpcError> make it harder to re-add a Data field later on if we want to do so?
* rpc: Refactor errors part 1: a new RpcMethod trait.Nick Mathewson2024-07-254-30/+36
| | | | | It is no longer necessary to say, for every RPC method, that its error type is RpcError.
* rpcbase: remove now-unused invoke methodsNick Mathewson2024-07-252-71/+34
| | | | | | | These methods were defined on DispatchTable, and then replaced by top-level functions in the crate. (The reason for using top-level functions instead is so that we get the locking on the dispatch table correct.)
* rpcbase: Remove a TODO RPC about duplicationNick Mathewson2024-07-251-1/+0
| | | | | The duplication is only a few lines. I've looked into a couple of ways for removing it, but they make the code flow even less clear.
* rpcbase: Replace a TODO with a set of notes and caveatsNick Mathewson2024-07-252-7/+45
| | | | | | We have decided not to remove the "anybody can define methods" property. This commit documents the consequences, and warns extenders away from some really bad ideas.
* rpc: remove TODO about adding an extension traitNick Mathewson2024-07-251-4/+0
| | | | | These functions are called rarely enough that it is probably okay for the ergonomics to be a bit verbose.
* rpc: Remove TODO about moving @special to a different macro.Nick Mathewson2024-07-251-4/+0
|
* rpc: Do not hide InvokeError::Bug when converting to RpcErrorNick Mathewson2024-07-251-18/+35
|
* rpc: split "method not found"Nick Mathewson2024-07-251-7/+7
| | | | | We've wanted separate error codes for "no such method exists" and "this method exists, but this object doesn't have it."
* rpcbase: remove "Nil" TODO.Nick Mathewson2024-07-251-3/+0
| | | | This change would take some serde magic that is probably not worth it.
* rpcbase: Use newer "tgens" deftly syntaxNick Mathewson2024-07-251-3/+1
|
* rpcbase: remove a TODO about expose_outside_of_sessionNick Mathewson2024-07-251-4/+0
| | | | (There is no longer such a thing as a "pseudomethod.")
* rpcbase: tests for crate-level invoke functions.Nick Mathewson2024-07-152-20/+73
|
* rpc: Test a previously unchecked cast function.Nick Mathewson2024-07-151-0/+3
|
* rpc: Test some lower level dispatch internals.Nick Mathewson2024-07-152-3/+81
|
* rpc: Tests for method name checking.Nick Mathewson2024-07-151-0/+38
|
* rpc: Add a test for failed downcast.Nick Mathewson2024-07-151-0/+9
|
* Update to derive-deftly 0.14Ian Jackson2024-07-081-1/+1
| | | | | This removes the deprecated syntaxes. Updating now will prevent us re-introducing the old syntaxes, which we updated in arti!2209.
* Update versions of 0.x tor-* and arti-* cratesIan Jackson2024-06-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nailing-cargo -uE set-version -p arti-client 0.20.0 nailing-cargo -uE set-version -p arti-relay 0.20.0 nailing-cargo -uE set-version -p arti-rpcserver 0.20.0 nailing-cargo -uE set-version -p tor-async-utils 0.20.0 nailing-cargo -uE set-version -p tor-basic-utils 0.20.0 nailing-cargo -uE set-version -p tor-bytes 0.20.0 nailing-cargo -uE set-version -p tor-cell 0.20.0 nailing-cargo -uE set-version -p tor-cert 0.20.0 nailing-cargo -uE set-version -p tor-chanmgr 0.20.0 nailing-cargo -uE set-version -p tor-checkable 0.20.0 nailing-cargo -uE set-version -p tor-circmgr 0.20.0 nailing-cargo -uE set-version -p tor-config 0.20.0 nailing-cargo -uE set-version -p tor-consdiff 0.20.0 nailing-cargo -uE set-version -p tor-dirclient 0.20.0 nailing-cargo -uE set-version -p tor-dirmgr 0.20.0 nailing-cargo -uE set-version -p tor-error 0.20.0 nailing-cargo -uE set-version -p tor-geoip 0.20.0 nailing-cargo -uE set-version -p tor-guardmgr 0.20.0 nailing-cargo -uE set-version -p tor-hsclient 0.20.0 nailing-cargo -uE set-version -p tor-hscrypto 0.20.0 nailing-cargo -uE set-version -p tor-hsrproxy 0.20.0 nailing-cargo -uE set-version -p tor-hsservice 0.20.0 nailing-cargo -uE set-version -p tor-keymgr 0.20.0 nailing-cargo -uE set-version -p tor-linkspec 0.20.0 nailing-cargo -uE set-version -p tor-llcrypto 0.20.0 nailing-cargo -uE set-version -p tor-log-ratelim 0.20.0 nailing-cargo -uE set-version -p tor-memquota 0.20.0 nailing-cargo -uE set-version -p tor-netdir 0.20.0 nailing-cargo -uE set-version -p tor-netdoc 0.20.0 nailing-cargo -uE set-version -p tor-persist 0.20.0 nailing-cargo -uE set-version -p tor-proto 0.20.0 nailing-cargo -uE set-version -p tor-protover 0.20.0 nailing-cargo -uE set-version -p tor-ptmgr 0.20.0 nailing-cargo -uE set-version -p tor-relay-selection 0.20.0 nailing-cargo -uE set-version -p tor-rpcbase 0.20.0 nailing-cargo -uE set-version -p tor-rtcompat 0.20.0 nailing-cargo -uE set-version -p tor-rtmock 0.20.0 nailing-cargo -uE set-version -p tor-socksproto 0.20.0 nailing-cargo -uE set-version -p tor-units 0.20.0 Each of which runs a rune like cargo set-version --offline -p tor-units 0.20.0
* Update to derive-deftly 0.13.0Ian Jackson2024-06-251-1/+1
| | | | | | | No code changes needed. Precisely nailing-cargo -Eu upgrade --incompatible -p derive-deftly
* Write a README for tor-rpcbaseNick Mathewson2024-06-241-0/+156
|
* Change deftly syntax to post 0.12.1 versionIan Jackson2024-06-172-2/+2
| | | | | | | | | | | * Change `pub` to `export` * Change the `=` in define to `:` * Change `pub_template_semver_check` to `template_export_semver_check` Right now, 0.12.1 supports both syntaxes. I have verified this branch also compiles with https://gitlab.torproject.org/Diziet/rust-derive-deftly/-/merge_requests/402 ee171ffaf56d7dcb7d75584054921153fe19b222
* Update to derive-deftly 0.12.1Ian Jackson2024-06-172-2/+6
| | | | | | * Bump in Cargo.toml * Deal with `${Xmeta as ...}` incompatible change, by always specifying an `as`, and changing `as tokens`.
* rpc: Missing rpc_invoker is a Bug.Nick Mathewson2024-06-101-1/+6
| | | | | Every method is either "special" or not; therefore, it is always a Bug if we look for an rpc_invoker and don't find one.
* Add more explanation of InvokerEnt fields.Nick Mathewson2024-06-101-0/+8
|
* rpc: Add RPC method invocation based on Context, not dispatch table.Nick Mathewson2024-06-102-1/+58
| | | | | | | | Doing it this way will allow us to invoke methods without holding the read lock on the table, implicitly or via the future. I am not yet removing the methods on DispatchTable, since the tests need them; I've added TODOs to revisit and remove later.
* rpc: Pass around our rpc::Context in an Arc.Nick Mathewson2024-06-102-26/+26
| | | | | | | | Formerly we used a Box. That was okay at first, but now that we want RPC methods to be able to invoke other RPC methods, we don't want the Invocable methods to have to consume the Context. This requires that Context become Sync.
* rpc: refactor DispatchTable invoker lookup into new functionsNick Mathewson2024-06-101-15/+36
|
* rpc: Implement Clone and HasKind on InvokeError.Nick Mathewson2024-06-101-1/+11
|
* Bump all the unstable tor- and arti- crates to 0.19.Gabriela Moldovan2024-06-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unstable crates are: - tor-error - tor-config - tor-units - tor-geoip - tor-rtcompat - tor-rtmock - tor-log-ratelim - tor-rpcbase - tor-memquota - tor-llcrypto - tor-protover - tor-bytes - tor-hscrypto - tor-socksproto - tor-checkable - tor-cert - tor-linkspec - tor-cell - tor-proto - tor-netdoc - tor-consdiff - tor-netdir - tor-relay-selection - tor-persist - tor-chanmgr - tor-ptmgr - tor-guardmgr - tor-circmgr - tor-dirclient - tor-dirmgr - tor-keymgr - tor-hsclient - tor-hsservice - tor-hsrproxy - arti-client - arti-rpcserver - arti-hyper - tor-basic-utils - tor-async-utils Done using ``` for p in "${unstable[@]}"; do cargo set-version -p $p 0.19; done ``` where `unstable` contains the list above