aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tor-rtcompat: Debug dump type of contained inner runtimederive-traitsIan Jackson2022-03-021-1/+3
|
* Replace manual Default, and abolish new, in tor-rtcompatIan Jackson2022-03-021-13/+1
| | | | The Default impl was the only call site for new()
* Replace manual Default and new with std derive in tor-protoIan Jackson2022-03-022-18/+4
|
* Replace manual Default and new with std derive in tor-netdocIan Jackson2022-03-022-17/+5
|
* Replace manual Default and new with std derive in tor-dirclientIan Jackson2022-03-021-30/+6
|
* Replace manual Default impl with std derive in tor-configIan Jackson2022-03-021-7/+1
|
* Replace manual Default impl with std derive in tor-cellIan Jackson2022-03-021-6/+1
|
* Replace manual Clone impl with std derive in retry-errorIan Jackson2022-03-021-11/+1
| | | | | | | | This just clones the fields. It is not clear to me why it was written this way in be86df631dec Remove anyhow dependency from tor-retry, and rename it to retry-error Previously, I think, RetryError wasn't Clone.
* Replace manual Debug impl with std derive in tor-circmgrIan Jackson2022-03-021-10/+3
| | | | | | | | | | | | | | | | | When I wrote this, I arranged to skip dumping the field `pending`. This must have been because I thought that either (a) PendingEntry couldn't `#[derive(Debug)]` (but it can) and/or (b) Some of the fields of PendingEntry ought not to be dumped because they might contain (eg) packet data. But I think they don't: there's just the spec, and the Result which is (basically) a Circ. I tried preseving something closer to the original using educe, but educe gets somehow tangled up with the generics, and the result fails to compile. I haven't investigated this further.
* tor-llcrypto: Replace a tiny bit of code duplication with a callIan Jackson2022-03-021-1/+1
| | | | No functional change.
* tor-llcrypto: Add test case for RsaIdentity formattingIan Jackson2022-03-021-0/+19
| | | | | | | I'm going to change the code that does this, so add a test first to check the output doesn't change. At some point we should have more RSA tests.
* add_warning: remove clone_on_ref_ptrNick Mathewson2022-03-011-1/+0
| | | | See !352
* Merge branch 'clippy-allow-arc-clone' into 'main'Nick Mathewson2022-03-0130-30/+0
|\ | | | | | | | | Disable clippy::clone_on_ref_ptr See merge request tpo/core/arti!352
| * Disable clippy::clone_on_ref_ptrIan Jackson2022-02-2430-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lint is IMO inherently ill-conceived. I have looked for the reasons why this might be thought to be a good idea and there were basically two (and they are sort of contradictory): I. "Calling ‘.clone()` on an Rc, Arc, or Weak can obscure the fact that only the pointer is being cloned, not the underlying data." This is the wording from https://rust-lang.github.io/rust-clippy/v0.0.212/#clone_on_ref_ptr It is a bit terse; we are left to infer why it is a bad idea to obscure this fact. It seems to me that if it is bad to obscure some fact, that must be because the fact is a hazard. But why would it be a hazard to not copy the underlying data ? In other languages, faliing to copy the underlying data is a serious correctness hazard. There is a whose class of bugs where things were not copied, and then mutated and/or reused in multiple places in ways that were not what the programmer intended. In my experience, this is a very common bug when writing Python and Javascript. I'm told it's common in golang too. But in Rust this bug is much much harder to write. The data inside an Arc is immutable. To have this bug you'd have use interior mutability - ie mess around with Mutex or RefCell. That provides a good barrier to these kind of accidents. II. "The reason for writing Rc::clone and Arc::clone [is] to make it clear that only the pointer is being cloned, as opposed to the underlying data. The former is always fast, while the latter can be very expensive depending on what is being cloned." This is the reasoning found here https://github.com/rust-lang/rust-clippy/issues/2048 This is saying that *not* using Arc::clone is hazardous. Specifically, that a deep clone is a performance hazard. But for this argument, the lint is precisely backwards. It's linting the "good" case and asking for it to be written in a more explicit way; while the supposedly bad case can be written conveniently. Also, many objects (in our codebase, and in all the libraries we use) that are Clone are in fact simply handles. They contain Arc(s) (or similar) and are cheap to clone. Indeed, that is the usual case. It does not make sense to distinguish in the syntax we use to clone such a handle, whether the handle is a transparent Arc, or an opaque struct containing one or more other handles. Forcing Arc::clone to be written as such makes for code churn when a type is changed from Arc<Something> to Something: Clone, or vice versa.
* | Bump all crates to 0.1.0arti-v0.1.0Nick Mathewson2022-03-0132-191/+191
| |
* | Whoops I forgot to a verb.Nick Mathewson2022-03-011-1/+1
| |
* | Finish the changelog for 0.1.0Nick Mathewson2022-03-011-39/+53
| |
* | Final "cargo update" before relase.Nick Mathewson2022-03-011-6/+6
| |
* | Update README.md files from rustdoc.Nick Mathewson2022-03-017-112/+173
| |
* | Merge branch 'integration_fix' into 'main'eta2022-03-011-1/+15
|\ \ | | | | | | | | | | | | | | | | | | chutney/setup: Wait for port 9150 to open after launching arti Closes #367 See merge request tpo/core/arti!370
| * | chutney/setup: Wait for port 9150 to open after launching artiNick Mathewson2022-02-281-1/+15
| | | | | | | | | | | | | | | This is not a replacement for a real startup protocol, but it may help repair our CI.
* | | Fix rustdoc errors.Nick Mathewson2022-03-013-10/+11
| | |
* | | Run rustfmt.Nick Mathewson2022-03-011-1/+0
| | |
* | | Merge remote-tracking branch 'origin/mr/371'Nick Mathewson2022-03-013-3/+32
|\ \ \
| * | | arti-hyper: Upgrade from an example to an "adaptation layer"Ian Jackson2022-03-012-1/+9
| | | |
| * | | arti-hyper: Expand docsIan Jackson2022-03-011-1/+15
| | | |
| * | | arti-hyper: Drop obsolete comment about not doing TLSIan Jackson2022-03-011-2/+0
| | | |
| * | | arti-client: Add stability warning to config moduleIan Jackson2022-03-011-0/+9
| | | |
| * | | Merge branch 'main' into hyper-docsIan Jackson2022-03-018-91/+387
| |\ \ \
* | | | | Merge branch '010_docs'Nick Mathewson2022-03-017-20/+87
|\| | | |
| * | | | Update our stability warning on arti-client.Nick Mathewson2022-02-281-5/+12
| | | | |
| * | | | Add warnings about configuration stability.Nick Mathewson2022-02-283-2/+24
| | | | |
| * | | | Update README in preparation for 0.1.0 release.Nick Mathewson2022-02-281-8/+9
| | | | |
| * | | | Add new crates to doc/Architecture.mdNick Mathewson2022-02-281-0/+12
| | | | |
| * | | | Update FAQs about status and plans.Nick Mathewson2022-02-281-5/+30
| | |/ / | |/| |
* | | | Merge branch 'eta/326' into 'main'Ian Jackson2022-03-0111-204/+297
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | Refactor multiple runtime support in order to clean up documentation Closes #326 See merge request tpo/core/arti!364
| * | | Merge branch 'main' into 364Ian Jackson2022-03-0110-92/+521
| |\ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | Conflicts: crates/arti-hyper/examples/hyper.rs Trivially resolved. Hyper example still works.
* | | | Merge branch 'tls' into 'main'Nick Mathewson2022-02-287-46/+337
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Implement TLS in arti-hyper See merge request tpo/core/arti!355
| * | | | Add nix exception to downgrade_dependencies.Nick Mathewson2022-02-281-1/+2
| | | | |
| * | | | maint/downgrade_dependencies: Upgrade zeroize_derive, env_loggerIan Jackson2022-02-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The *earlier* versions of these crates pull in *dependencies* that violate our MSRV policy by requiring a *later* version of Rust. Empirically, env_logger 0.5.4 would be enough, but practice here seems to be to just say "cargo update".
| * | | | Fix typo in messageNick Mathewson2022-02-281-1/+1
| | | | |
| * | | | arti-hyper: Add vacuous doc comments as required by clippyIan Jackson2022-02-281-0/+3
| | | | |
| * | | | EK::RemoteProtocolFailed replaces OtherRemoteIan Jackson2022-02-282-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/355#note_2781816
| * | | | Fix rustfmtIan Jackson2022-02-281-9/+10
| | | | | | | | | | | | | | | | | | | | I disagree with all these. Whatever.
| * | | | arti-hyper: Abolish a bool in favour of a custom private enumIan Jackson2022-02-281-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/355#note_2781820
| * | | | arti-hyper: Box the http variant (bare DataStream)Ian Jackson2022-02-281-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/355#note_2781819
| * | | | arti-hyper: Fix duplicative doc comment not to be wrongIan Jackson2022-02-281-1/+1
| | | | |
| * | | | arti-hyper: Drop description of nonexistent error-detail featureIan Jackson2022-02-281-3/+0
| | | | |
| * | | | arti-hyper: Clarify what the TLS features do.Ian Jackson2022-02-281-1/+2
| | | | |
| * | | | arti-hyper: Actually support TLSIan Jackson2022-02-283-19/+39
| | | | |