Commit Graph

84 Commits

Author SHA1 Message Date
Nick Mathewson b774360755 Remove "publish = false" 2021-06-24 07:04:26 -04:00
Nick Mathewson 31b66956b4 Bump tokio-related dependencies 2021-06-24 06:39:37 -04:00
Nick Mathewson 9310273448 Remove some (but not all) needless dependencies. 2021-06-17 09:09:43 -04:00
Nick Mathewson 2102d2e2b5 Add noop_method_call warning.
This would have saved ahf and me a lot of confusion in debugging a
situation where we were cloning a reference of a type that didn't
implement Clone.
2021-05-27 14:32:29 -04:00
Nick Mathewson 745c90e92c Enable cargo_common_metadata warning. 2021-05-25 15:42:47 -04:00
Nick Mathewson cf59e9be77 Add automatically generated README.md files to each crate. 2021-05-25 15:41:23 -04:00
Nick Mathewson 696202217b Add a link tto the tor website to arti blurb. 2021-05-24 08:44:04 -04:00
Nick Mathewson 25dc8c3dd5 Add a conversion from TimeoutError to IoError. 2021-05-21 16:51:16 -04:00
Nick Mathewson 50aee17871 Add tor-proto docs and tweak docs+apis elsewhere. 2021-05-21 15:40:08 -04:00
Nick Mathewson 6d2d897158 Improve crate-level tor-rtcompat documentation 2021-05-21 14:58:30 -04:00
Nick Mathewson 7c28b693f2 Remove a redundant feature in tokio 2021-05-20 14:02:17 -04:00
Nick Mathewson 6313ee0456 Implement Runtime for a thin wrapper around tokio runtime handles
Having this enables us to use Arti with an externally constructed
tokio runtime.
2021-05-20 13:54:36 -04:00
Nick Mathewson ce6702a147 Give every Cargo.toml a repository field 2021-05-19 14:56:09 -04:00
Nick Mathewson bd31d21c42 Try to avoid a tor-rtcompat publicness warning 2021-05-18 14:36:13 -04:00
Nick Mathewson 411e1b35e0 Add the "unreachable_pub" lint.
This is a somewhat obnoxious change in its scope and requirements,
but it makes it easier to understand what the real public and
private parts of our APIs are.
2021-05-18 13:45:39 -04:00
Nick Mathewson c1f7d49ded tor-rtcompat: Add missing documentation for async_std.rs 2021-05-07 15:50:42 -04:00
Nick Mathewson 8eb36cbfff Add trait_duplication_in_bounds warning. 2021-05-03 16:30:27 -04:00
Nick Mathewson d516298b47 Add unseparated_literal_suffix lint, and fix it. 2021-05-03 16:19:01 -04:00
Nick Mathewson 9737580402 Add a few more clippy warnings 2021-05-03 16:10:39 -04:00
Nick Mathewson 615e2ed31a Split mocking parts of rtcompat into new rtmock crate.
Since these parts are testing-only, let's take steps to make sure we
don't ship them in production by accident.
2021-05-03 09:10:33 -04:00
Nick Mathewson 098cd61409 bump to latest async_io 2021-05-03 08:42:08 -04:00
Nick Mathewson c372671b5a Note a limitation in MockSleepProvider::advance 2021-04-28 13:47:01 -04:00
Nick Mathewson 64e32b8199 Remove most pin_project usage in tor_rtcompat. 2021-04-28 11:51:59 -04:00
Nick Mathewson 95671bd71d Define a runtime wrapper to override the network. 2021-04-28 11:08:37 -04:00
Nick Mathewson d3380877cc Add a mock TLS provider. 2021-04-28 10:00:43 -04:00
Nick Mathewson 202096e98a Add a MockNetwork structure for testing.
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.
2021-04-28 08:51:49 -04:00
Nick Mathewson 94c93c9121 Add some more clippy warnings to our list. 2021-04-27 14:51:04 -04:00
Nick Mathewson 2e3780affb Enforce (and obey) clippy lints about exhaustive enums, structs.
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).
2021-04-27 14:17:49 -04:00
Nick Mathewson 4306a28ddd cargo fix --edition-idioms 2021-04-26 11:11:05 -04:00
Nick Mathewson 27097c24c4 Small doc fix. 2021-04-24 11:01:55 -04:00
Nick Mathewson acc4e09d60 Define a helper for replacing the sleep functionality of a runtime. 2021-04-22 17:05:37 -04:00
Nick Mathewson 2e34a53f9b Add a yield_now() call to MockSleepProvider::advance()
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.
2021-04-21 14:05:49 -04:00
Nick Mathewson b40a1edc54 tor_rtcompat: add a yield_now() function. 2021-04-21 13:48:18 -04:00
Nick Mathewson d19ed533d2 Add a "socketpair"-style linked-reader/writer implementation for testing 2021-04-21 08:40:50 -04:00
Nick Mathewson f6ca37cbe1 Disable a test on OSX; see arti#111 2021-04-20 15:40:36 -04:00
Nick Mathewson 3fc66306c5 Tests for sleep_until_wallclock. 2021-04-20 09:34:34 -04:00
Nick Mathewson 4a761f55ea A little more testing for tor_rtcompat::mock::time. 2021-04-20 08:26:41 -04:00
Nick Mathewson a910627e92 Add support for simulating the passage of time. 2021-04-19 20:13:12 -04:00
Nick Mathewson 5f850fad1f Add "now" functions to SleepProvider. 2021-04-19 20:03:27 -04:00
Nick Mathewson ec6dc417b9 rtcompat: remove an unused conversion function. 2021-04-19 10:28:41 -04:00
Nick Mathewson fe22c329c6 Simple unit tests for tor_rtcompat: at last! 2021-04-19 10:24:13 -04:00
Nick Mathewson a271faca3a rtcompat: mark some outputs as must-use. 2021-04-19 10:08:18 -04:00
Nick Mathewson b8e1234a4c Clarify what TlsConnector doesn't validate. 2021-04-19 08:24:22 -04:00
Nick Mathewson 50f5ad9850 Flatten async_std impl module slightly. 2021-04-19 08:20:20 -04:00
Nick Mathewson e3c51519e8 Flatten tokio TcpProvider implementation a bit. 2021-04-19 08:15:12 -04:00
Nick Mathewson 065162aff2 Add a local_addr() function for TcpListener. 2021-04-18 18:02:30 -04:00
Nick Mathewson 975374beb5 Fix some broken rustdoc links. 2021-04-18 17:55:43 -04:00
Nick Mathewson 342a98dccd tor_rtcompat: Documentation and cleanups 2021-04-17 17:09:20 -04:00
Nick Mathewson a774cdde80 Remove the no-longer-needed "global runtime" code. 2021-04-17 17:09:20 -04:00
Nick Mathewson ee556eb714 Remove some cruft in tor_rtcompat::impls 2021-04-17 17:09:20 -04:00