summaryrefslogtreecommitdiff
path: root/crates/tor-rtcompat/src/opaque.rs
Commit message (Collapse)AuthorAgeFilesLines
* rtcompat: new server-related members on TlsProvider trait.Nick Mathewson2026-01-291-0/+7
| | | | | These are as yet unimplemented; there's a stub type for the providers (nativetls) that won't actually have them.
* opentelemetry: Instrument a bunch of functions.Wesley Aptekar-Cassels2025-11-241-0/+2
| | | | | These are all aimed at figuring out in more detail what's going on in #2079 and related issues.
* tor-rtcompat: add `#[track_caller]` within `implement_opaque_runtime`Steven Engler2025-11-041-0/+8
| | | | | | | This adds the `#[track_caller]` attribute to spawn-related trait method impls, for traits implemented by the `implement_opaque_runtime` macro. This is for compatibility with tokio-console.
* tor-rtcompat, tor-rtmock: Allow unused functions.Gabriela Moldovan2025-07-071-0/+1
| | | | These only serve as a compile-time check.
* tor-rtcompat: BlockOn: relax bounds on reenter_block_onIan Jackson2025-04-091-1/+1
| | | | The future no longer needs to be `Send + 'static`.
* tor-rtcompat: Rename spawn_thread to spawn_blockingIan Jackson2025-03-041-2/+2
| | | | Let's use Tokio terminology here.
* tor-rtcompat: Provide a new function for executor re-entryIan Jackson2025-03-041-0/+9
| | | | | | | | | | | | | | | Forbid re-entering the executor using ToplevelBlockOn::block_on. This was always forbidden in the case of MockExecutor, but that meant that tests using MockExecutor would malfunction if the code under test needed to re-enter the executor from sync code (since the code under test would have to use block_on, which wrong). See #1835. Provide a function which *can* do this, reenter_block_on. The MockExecutor needs to know the difference, and other runtimes may too. They are conceptually quite different operations. Introduce ToplevelRuntime as a convenience alias.
* tor-rtcompat: New plan for blocking interaction, Blocking traitIan Jackson2025-03-041-4/+4
| | | | | | | | | | | | | | | * Document the new plan for blocking interaction in the trait-level docs for the Blocking trait (used to be SpawnBlocking). Add cross-references (in some cases to not-yet-existing pieces). * Rename: spawn_blocking to spawn_thread. We're going to distinguish thread-creation (relatively expensive) from brief entry to sync code (relatively cheap, but more restricted). * Rename the SpawnBlocking trait to Blocking, and its ThreadHandle to ThreadHandle. This trait is going to gain more functionality. * Add the missing mention of `Blocking` to the docs for `Runtime`.
* tor-rtcompat: Rename BlockOn to ToplevelBlockOnIan Jackson2025-03-041-1/+1
| | | | | | | | | | We're going to distinguish top-level runtime entry, from *re*-entry to an existing executor. It is most convenient to rename this trait first. Documentation of the distinction will come later. (We're going to retain the function name `block_on`, but we want the trait to be more obviously a top-level only thing, though, so we give it a name that will hopefully avoid it peroulating throughout the codebase..)
* tor-rtcompat: Big invasive change adding StreamOps bound everywhere.Gabriela Moldovan2025-01-151-1/+1
| | | | | | This is unfortunately necessary, because after the channel handshake, we need to give the channel reactor a `StreamOps` handle to the underlying stream.
* tor-rtcompat: Use GAT instead of RPIT in SpawnBlocking trait.Wesley Aptekar-Cassels2025-01-071-1/+3
| | | | Due to the limitations on RPIT, it's better to use a GAT for now.
* tor-rtcompat: Add spawn_blocking to Runtime trait.Wesley Aptekar-Cassels2025-01-071-0/+11
| | | | | This adds a new SpawnBlocking trait, which exposes the spawn_blocking function that tokio, async-std, and other runtimes have.
* Remove re-export of "unix" from tor_rtcompat.Nick Mathewson2024-10-291-5/+5
|
* Make Runtime require NetStreamProvider<unix::SocketAddr>Nick Mathewson2024-09-241-1/+14
|
* rtcompat: Rename TcpProvider to NetStreamProvider.Nick Mathewson2024-09-241-5/+5
| | | | | | | | | | | | | | (And similarly rename TcpListener to NetStreamListener, along with their TcpStream/TcpListener associated types.) These types are about to become generic over addresses, and therefore shouldn't be named after TCP. Renaming was done mostly with Rust Analyzer, except for some macros that needed to be hand-edited. (I'll revise the comments in the next commit; this one is all about renaming.)
* tls: Support export keying material (RFC 5705)David Goulet2024-06-181-0/+4
| | | | | | | | | | | | | Add a function to get the keying material as detailed by RFC 5705. Because native-tls doesn't have such support, there is a place holder panic!() for now. This means that for the forseable future, relay would only work with rustls until we figure out a solution for native-tls. Closes #1432 Signed-off-by: David Goulet <[email protected]>
* tor-rtcompat: implement_opaque_runtime impls CoarseTimeProviderIan Jackson2024-03-251-0/+7
| | | | Now all our non-mock runtime types impl CoarseTimeProvider.
* add udp to runtimetrinity-1686a2022-03-141-0/+10
|
* tor-rtcompat: Provide TLS wrapping for all streamsIan Jackson2022-02-241-3/+5
| | | | | | | | Now all of the runtime types we provide all impl<S> TlsProvider<S> where S: ... rather than merely TlsProvider<Self::TcpStream>. And we document and intent to perhaps require this in the future.
* Rename `SpawnBlocking` trait to `BlockOn`.Nick Mathewson2022-01-261-1/+1
| | | | | This avoids a future confusion with the new `SpawnBlocking` trait in async_executors v0.5, and better describes what the trait provides.
* Refactor Runtimes to use separate TLS implementations internally.Nick Mathewson2022-01-191-0/+6
| | | | | This will make it easier to implement them using some other TLS provider as well, without having to duplicate all of our code.
* Add a macro to help with opaque Runtime wrappers.Nick Mathewson2022-01-191-0/+69
We're soon going to have our different Runtime types be built as CompoundRuntime instances. We don't want to expose that detail, though, so we'll use this macro to make them implement the right traits.