summaryrefslogtreecommitdiff
path: root/crates/arti-rpcserver/src/objmap.rs
Commit message (Collapse)AuthorAgeFilesLines
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* rpc: make decl_object! responsible for writing impl Object {} blocks.Nick Mathewson2023-06-071-2/+0
|
* rpc: Slightly refactor GenIdx encoding.Nick Mathewson2023-06-051-15/+25
|
* Merge branch 'rpc-auth-and-meta' into 'main'Nick Mathewson2023-05-241-5/+11
|\ | | | | | | | | rpc: authentication and basic handle manipulation See merge request tpo/core/arti!1200
| * rpc: Implement functionality to remove objects from a sessionNick Mathewson2023-05-241-5/+11
| | | | | | | | | | | | | | | | | | | | | | I've made doing some design choices here: * Reserving "rpc" as a prefix for post-authentication functionality that is not arti-specific. * Declaring these to be methods on the session rather than methods on the objects themselves. There's a problem with defining an API to drop a weak reference; see comment in code.
* | rpc: Remove fake_generational_arenaNick Mathewson2023-05-231-76/+1
|/ | | | | | | Now that generation-arena has merged [@diziet's patch] to clarify their license, we no longer need to disable it. [@diziet's patch]: https://github.com/fitzgen/generational-arena/pull/56
* rpc: Split the generational index into two.Nick Mathewson2023-05-161-113/+92
| | | | This lets us simplify our logic a bit for strong references.
* rpc: Change the formatting of object IDsNick Mathewson2023-05-151-22/+71
| | | | | | | | | | | | | | | | | | We want each ID to have a unique form every time it is given out, so that you can't use ID==ID to check whether Object==Object. (See discussions leading to #848.) We'd also like the form of object IDs to be a little annoying to analyze, to discourage people from writing programs that depends on their particular format. (We are reserving the right to change the format whenever we want.) We _don't_ want to use any cryptography here (yet), lest somebody think that this is an actual security mechanism. (This isn't for security; it's for encouraging developers to treat IDs as opaque.) With that in mind, we now lightly obfuscate our generational indices before returning them.
* rpc: rename GenIdx::into/try_from implementationsNick Mathewson2023-05-151-8/+6
| | | | | These are about to become nondeterministic-ish and probably shouldn't use the Into/TryFrom traits.
* rpc: do not deduplicate strong object idsNick Mathewson2023-05-151-52/+39
| | | | | | | | Per discussion referenced at #848, we want each operation that returns a strong object ID to return a new, distinct strong ID. Note that we no longer need to put strong and weak references in the same arena; we can clean this code up a lot down the road.
* rpc: Repair an error in our ObjectId encoding.Nick Mathewson2023-05-151-1/+1
| | | | | | Now we generate object IDs that we can parse. This is about to be obsolete once we change how we generate objects and their IDs for #848, but we may as well start from a working state.
* objmap: move types to top of file.Nick Mathewson2023-05-041-74/+74
|
* Note/clean more TODOs in objmap.Nick Mathewson2023-05-041-1/+4
|
* RPC: Make "Weak" and "Strong" entries separate.Nick Mathewson2023-05-041-43/+41
| | | | | | | | | Now there can be one of each, since we want references and handles to be conceptually separate. (The alternative would be to say that an operation either "returns a handle" or "returns a reference (which may become a handle) unless a handle already exists.")
* Temporarily replace generational-arena with a fake version.Nick Mathewson2023-05-041-1/+77
| | | | | This fake version is completely silly, but it will do the job until we figure out our MPL2 concerns.
* Add a generational arena for object mapping for RPC.Nick Mathewson2023-05-041-0/+663
See the comments on `TypedAddr` for some explanations about why this is so tricky. Thanks to @diziet for helping me figure this out.