aboutsummaryrefslogtreecommitdiff
path: root/tor-rtcompat
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a MockNetwork structure for testing.Nick Mathewson2021-04-283-0/+477
| | | | | This isn't a shadow replacement: it's just a testing fixture that we can use to try out code that wants to connect and/or listen.
* Add some more clippy warnings to our list.Nick Mathewson2021-04-271-1/+6
|
* Enforce (and obey) clippy lints about exhaustive enums, structs.Nick Mathewson2021-04-273-0/+5
| | | | | | | | These lints force us to declare our exported enums and exhaustive-looking structs as non-exhaustive (so that we can add to them in the future without breaking our API) or to explicitly disable the warning for a given enum/struct (to say that we _intend_ for additions to be a breaking change).
* cargo fix --edition-idiomsNick Mathewson2021-04-261-1/+1
|
* Small doc fix.Nick Mathewson2021-04-241-1/+1
|
* Define a helper for replacing the sleep functionality of a runtime.Nick Mathewson2021-04-223-0/+93
|
* Add a yield_now() call to MockSleepProvider::advance()Nick Mathewson2021-04-212-15/+26
| | | | | | | | This is almost always what we want for testing: the task that is advancing time wants to give the other tasks a chance to run. Doing this turns MockSleepProvider::advance() into an async function.
* tor_rtcompat: add a yield_now() function.Nick Mathewson2021-04-212-0/+83
|
* Add a "socketpair"-style linked-reader/writer implementation for testingNick Mathewson2021-04-213-1/+261
|
* Disable a test on OSX; see arti#111Nick Mathewson2021-04-201-0/+5
|
* Tests for sleep_until_wallclock.Nick Mathewson2021-04-201-6/+175
|
* A little more testing for tor_rtcompat::mock::time.Nick Mathewson2021-04-201-0/+25
|
* Add support for simulating the passage of time.Nick Mathewson2021-04-193-0/+245
|
* Add "now" functions to SleepProvider.Nick Mathewson2021-04-192-2/+16
|
* rtcompat: remove an unused conversion function.Nick Mathewson2021-04-191-5/+0
|
* Simple unit tests for tor_rtcompat: at last!Nick Mathewson2021-04-193-0/+260
|
* rtcompat: mark some outputs as must-use.Nick Mathewson2021-04-192-0/+3
|
* Clarify what TlsConnector doesn't validate.Nick Mathewson2021-04-193-7/+12
|
* Flatten async_std impl module slightly.Nick Mathewson2021-04-191-31/+30
|
* Flatten tokio TcpProvider implementation a bit.Nick Mathewson2021-04-191-64/+35
|
* Add a local_addr() function for TcpListener.Nick Mathewson2021-04-183-1/+12
|
* Fix some broken rustdoc links.Nick Mathewson2021-04-181-1/+1
|
* tor_rtcompat: Documentation and cleanupsNick Mathewson2021-04-175-71/+240
|
* Remove the no-longer-needed "global runtime" code.Nick Mathewson2021-04-173-51/+37
|
* Remove some cruft in tor_rtcompat::implsNick Mathewson2021-04-172-27/+4
|
* Remove need for async_trait in SleepProviderExtNick Mathewson2021-04-171-11/+42
|
* Move timer functions into an extension trait.Nick Mathewson2021-04-172-112/+110
|
* Move around the public modules in tor_rtcompat.Nick Mathewson2021-04-171-1/+8
|
* Remove all non-runtime methods in tor_rtcompat.Nick Mathewson2021-04-161-32/+5
|
* Add a "Runtime" parameter to all the manager types.Nick Mathewson2021-04-162-4/+20
| | | | | This is a big change, but it is a step towards our goal of removing tor_rtcompat:: calls directly.
* rtcompat: Make TLS functionality use Runtime traits.Nick Mathewson2021-04-164-45/+94
| | | | | Now there is nothing in principle that you couldn't access from a Runtime implementation.
* Move the "sleep()" function from task to timer.Nick Mathewson2021-04-161-9/+7
|
* Make incoming Streams of TcpStream a real type for each backend.Nick Mathewson2021-04-164-39/+90
| | | | | This makes things a little more complicated for AsyncStd, and a little simpler for Tokio.
* Port tor_rtcompat::net to use Runtime objects.Nick Mathewson2021-04-162-17/+41
|
* Port tor_rtcompat::timer to use Runtime objects.Nick Mathewson2021-04-163-29/+60
|
* Begin a refactoring of tor-rtcompat to use runtime objects.Nick Mathewson2021-04-165-27/+187
| | | | | | | | So far, all traits are defined (I hope) and the task api is ported. With time I want to have none of the current "global runtime" APIs exposed, and just use Runtime objects instead. But that isn't just yet.
* rtcompat: rename traits module to impl_traits.Nick Mathewson2021-04-161-1/+1
|
* rtcompat: Add a cancellable-task-handle type.Nick Mathewson2021-04-092-4/+24
| | | | | | | The API is a bit yucky, since it has to be compatible with tokio and async_std. (Also, this patch fixes some async_std clippy warnings)
* Move responsibility for knowing about TLS into tor_rtcompat.Nick Mathewson2021-03-235-3/+203
| | | | Now we don't need runtime-specific stuff in tor-chanmgr.
* Refactor tokio implpementation in tor-rtcompat.Nick Mathewson2021-03-232-9/+122
| | | | | | | | | | | Now other crates don't need any 'ifdef tokio' code, since there are wrappers that implement 'futures' right. Technically, the 'futures' traits are in some ways less good than the tokio ones, but we need a consistent API if we want to support WASM someday and keep support for async_std. I'd rather hold out hope for a future version of futures::io working like tokio than to fix ourselves into the tokioverse forever.
* Add appropriate categories to some Cargo.toml files.Nick Mathewson2021-03-171-0/+1
|
* Add the tor project as an author.Nick Mathewson2021-03-171-1/+1
|
* Add keywords to each Cargo.tomlNick Mathewson2021-03-171-0/+1
|
* Add a description field to all our Cargo.toml filesNick Mathewson2021-03-171-0/+1
|
* Give it a homepage everyplace.Nick Mathewson2021-03-171-0/+1
|
* Cut down on tokio features.Nick Mathewson2021-03-101-1/+1
|
* Bump dependencies with "cargo upgrade"Nick Mathewson2021-03-061-1/+1
|
* Update docs wrt tokio a bitNick Mathewson2021-03-021-5/+16
|
* Port to work with tokio or async-std.Nick Mathewson2021-03-025-3/+99
| | | | | | | | | | | | | | | | | | This is fairly ugly and I think I'll need to mess around with the feature configuration a while until we get something that's pleasant to develop with. This still seems like a good idea, though, since we _will_ need to be executor-agnostic in the end, or we'll have no way to handle wasm or embedded environments. Later down the road, we'll probably want to use futures::Executor or futures::Spawn more than having global entry points in tor_rtcompat. That would probably make our feature story simpler. Tokio is the default now, since tokio seems to be more heavily used for performance-critical stuff. This patch breaks tests; the next one will fix them, albeit questionably.
* Write a few misc unit testsNick Mathewson2020-12-151-6/+35
|