Commit Graph

76 Commits

Author SHA1 Message Date
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 61c62548a5 Module docs for remaining crates 2021-05-25 15:40:02 -04:00
Nick Mathewson ce6702a147 Give every Cargo.toml a repository field 2021-05-19 14:56:09 -04:00
Nick Mathewson 712e6ec23c Fill in "package.categories" on all Cargo.toml 2021-05-19 14:50:39 -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 90e96b32c8 Prefer "relay" to "server" when appropriate. 2021-05-18 10:34:15 -04:00
Nick Mathewson 760aab7a0a Fix documentation warnings. 2021-05-05 17:34:49 -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 f1541428af Make the MockNetProvider builder non-consuming. 2021-05-03 09:34:09 -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 45c1ee1720 Much-improved tests for tor_chanmgr::builder
Now that we have MockNetRuntime and MockSleepRuntime, we can use
them to test a channel-builder by replaying the contents of a TLS
stream that it will accept.
2021-04-30 13:50:22 -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 579767f670 Another test in ChanMgr, for TargetInfo. 2021-04-23 12:57:45 -04:00
Nick Mathewson 12c45882f0 Refactor and simplify ChanMgr to use AbstractChanMgr. 2021-04-23 12:57:45 -04:00
Nick Mathewson 8c75da128a Full documentations on the new parts of ChanMgr. 2021-04-23 12:57:45 -04:00
Nick Mathewson e3db6678f6 Start on tests for reactored ChanMsg. 2021-04-23 12:57:45 -04:00
Nick Mathewson 68dc2f56ce Begin refactoring ChanMgr to have better separation of concerns
Additionally:
   Use futures::future::Shared instead of event_listener.
2021-04-22 17:40:47 -04:00
Nick Mathewson 0d0cfbc874 Stop using anyhow in tor_chanmgr.
It seemed like a good idea at first, but we need to be able to
tell the difference between these error types more easily.
2021-04-22 13:37:54 -04:00
Nick Mathewson a774cdde80 Remove the no-longer-needed "global runtime" code. 2021-04-17 17:09:20 -04:00
Nick Mathewson 92de7c58f0 Move timer functions into an extension trait. 2021-04-17 09:37:46 -04:00
Nick Mathewson 6878fe8336 Move around the public modules in tor_rtcompat. 2021-04-17 09:21:09 -04:00
Nick Mathewson 1d07132787 Remove all non-runtime methods in tor_rtcompat. 2021-04-16 17:15:55 -04:00
Nick Mathewson 8532cef9aa Add a "Runtime" parameter to all the manager types.
This is a big change, but it is a step towards our goal of removing
tor_rtcompat:: calls directly.
2021-04-16 16:12:08 -04:00
Nick Mathewson ebcfd38b48 rtcompat: Make TLS functionality use Runtime traits.
Now there is nothing in principle that you couldn't access from a
Runtime implementation.
2021-04-16 15:44:36 -04:00
Nick Mathewson 3800c459f6 Rename Rsa{Identity,Signature} to fix clippy warning. 2021-03-29 16:14:43 -04:00
Nick Mathewson d073f24138 Move responsibility for knowing about TLS into tor_rtcompat.
Now we don't need runtime-specific stuff in tor-chanmgr.
2021-03-23 15:59:39 -04:00
Nick Mathewson 68f18d4fe3 Refactor tokio implpementation in tor-rtcompat.
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.
2021-03-23 11:00:09 -04:00
Nick Mathewson 6daf57957d Add the tor project as an author. 2021-03-17 14:43:40 -04:00
Nick Mathewson ba14d43be4 Add keywords to each Cargo.toml 2021-03-17 14:41:02 -04:00
Nick Mathewson c8481a9354 Add a description field to all our Cargo.toml files 2021-03-17 14:31:59 -04:00
Nick Mathewson 58d8472ea0 Give it a homepage everyplace. 2021-03-17 14:13:26 -04:00
Nick Mathewson 4818d57ed7 Bump a couple of deps 2021-03-13 17:25:05 -05:00
Nick Mathewson 695268019e upgrade async-trait 2021-03-09 09:43:00 -05:00
Nick Mathewson 302653977d Bump dependencies with "cargo upgrade" 2021-03-06 08:55:13 -05:00
Nick Mathewson 541883f3df Missing doc for private member 2021-03-02 14:08:04 -05:00
Nick Mathewson 572e2b93de Update docs wrt tokio a bit 2021-03-02 12:12:41 -05:00
Nick Mathewson bbfbdec733 Make a few async_test tests work correctly again.
For these, we need to call tor_rtcompat::task::block_on() directly,
since they would crash with tokio enabled.  Perhaps down the line we
should look for a better fix here.
2021-03-02 11:59:52 -05:00
Nick Mathewson 8c31418500 Port to work with tokio or async-std.
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.
2021-03-02 11:55:09 -05:00
Nick Mathewson 568567c5e0 Update to latest futures, once_cell 2021-02-23 15:54:29 -05:00
Nick Mathewson ab9d4a2229 Update some dependencies. 2021-02-19 09:39:23 -05:00
Nick Mathewson 243880473f bump serde and log 2021-02-01 16:39:07 -05:00
Nick Mathewson 3f455e6f30 require latest futures crate 2021-01-15 17:05:05 -05:00
Nick Mathewson fa57fb4995 Upgrade a few more dependencies. 2021-01-13 08:17:14 -05:00
Nick Mathewson 7e843de2c8 Upgrade a few dependencies. 2021-01-13 08:14:28 -05:00
Nick Mathewson f01d641ec8 cargo upgrade. 2020-12-30 15:59:33 -05:00