summaryrefslogtreecommitdiff
path: root/crates/tor-rtcompat
Commit message (Collapse)AuthorAgeFilesLines
* Bump all the unstable tor- and arti- crates to 0.25.0.Gabriela Moldovan2024-12-021-3/+3
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.25.0 done ```
* cargo: Update `thiserror` to `2`Clara Engler2024-11-121-1/+1
|
* Remove obsolete semver files post 1.3.0 releaseIan Jackson2024-10-311-1/+0
|
* Merge branch 'versions' into 'main'Ian Jackson2024-10-301-3/+3
|\ | | | | | | | | Version bumps for release of 1.3.0 See merge request tpo/core/arti!2599
| * Bump unstable tor-* and arti-* crates to 0.24.0Ian Jackson2024-10-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cargo set-version -p tor-async-utils 0.24.0 cargo set-version -p tor-basic-utils 0.24.0 cargo set-version -p tor-bytes 0.24.0 cargo set-version -p tor-cell 0.24.0 cargo set-version -p tor-cert 0.24.0 cargo set-version -p tor-chanmgr 0.24.0 cargo set-version -p tor-checkable 0.24.0 cargo set-version -p tor-circmgr 0.24.0 cargo set-version -p tor-config 0.24.0 cargo set-version -p tor-config-path 0.24.0 cargo set-version -p tor-consdiff 0.24.0 cargo set-version -p tor-dirclient 0.24.0 cargo set-version -p tor-dirmgr 0.24.0 cargo set-version -p tor-error 0.24.0 cargo set-version -p tor-general-addr 0.24.0 cargo set-version -p tor-geoip 0.24.0 cargo set-version -p tor-guardmgr 0.24.0 cargo set-version -p tor-hsclient 0.24.0 cargo set-version -p tor-hscrypto 0.24.0 cargo set-version -p tor-hsrproxy 0.24.0 cargo set-version -p tor-hsservice 0.24.0 cargo set-version -p tor-key-forge 0.24.0 cargo set-version -p tor-keymgr 0.24.0 cargo set-version -p tor-linkspec 0.24.0 cargo set-version -p tor-llcrypto 0.24.0 cargo set-version -p tor-log-ratelim 0.24.0 cargo set-version -p tor-memquota 0.24.0 cargo set-version -p tor-netdir 0.24.0 cargo set-version -p tor-netdoc 0.24.0 cargo set-version -p tor-persist 0.24.0 cargo set-version -p tor-proto 0.24.0 cargo set-version -p tor-protover 0.24.0 cargo set-version -p tor-ptmgr 0.24.0 cargo set-version -p tor-relay-crypto 0.24.0 cargo set-version -p tor-relay-selection 0.24.0 cargo set-version -p tor-rpcbase 0.24.0 cargo set-version -p tor-rtcompat 0.24.0 cargo set-version -p tor-rtmock 0.24.0 cargo set-version -p tor-socksproto 0.24.0 cargo set-version -p tor-units 0.24.0 cargo set-version -p arti-client 0.24.0 cargo set-version -p arti-relay 0.24.0 cargo set-version -p arti-rpc-client-core 0.24.0 cargo set-version -p arti-rpcserver 0.24.0
* | cargo: Run fixup-featuresIan Jackson2024-10-301-1/+1
|/ | | | | | | This is output from nailing-cargo -Eu run -p fixup-features Cargo.toml There are some formatting glitches which I'll fix in a moment.
* Fix Windows compilation after moving unix::SocketAddr.Nick Mathewson2024-10-291-6/+6
|
* Add semver file for removed members of tor-rtcompat.Nick Mathewson2024-10-291-0/+1
|
* Remove re-export of "general::*" from tor-rtcompat.Nick Mathewson2024-10-291-17/+15
|
* Remove re-export of "unix" from tor_rtcompat.Nick Mathewson2024-10-297-24/+26
|
* Extract general::SocketAddr and its unix friends to their own crate.Nick Mathewson2024-10-297-605/+25
| | | | This is mostly code motion.
* Python: simple annotations to allow mypy to pass.Nick Mathewson2024-10-241-1/+1
|
* python: one import per line.Nick Mathewson2024-10-241-1/+2
|
* Run "black" to reformat all our pythonNick Mathewson2024-10-241-4/+3
| | | | | | | | | | | | | | | | | "Black" is an "opinionated" python formatter, whose opinionatedness is somewhat in the spirit of rustfmt. This MR runs black with default settings on all of our python code in Arti. It was produced by the following commands ``` # Everything in python/ black python/ # Everything with a .py extension fd '.py$' -X black # Everything with a python shebang. git grep -l '#! */usr/bin/env *python' | xargs black ```
* general::SocketAddr: Say "inet" rather than "tcp"Nick Mathewson2024-10-171-35/+35
| | | | | | | | | | "inet" makes more sense, since in principle these can also be used for udp, etc. Also making a corresponding change in rpc-connect-sketch.md, which uses this format. Closes #1701.
* rtcompat: Fix android compilation in `general`Nick Mathewson2024-10-171-1/+3
| | | | | | | | Previously I had assumed that `std::os::linux` also existed on android, based on the documentation of `std::os::linux::net::SocketAddrExt`. That is not, however, true. This should fix the `check-targets` CI job.
* rtcompat: Add a fuzzer for round-trip general::SocketAddr parsing.Nick Mathewson2024-10-164-1/+80
| | | | (This turned up another place where we need documentation.)
* rtcompat: Add a fuzzer for general::SocketAddr parsingNick Mathewson2024-10-163-0/+43
| | | | | The fuzzer makes sure that whatever we can parse, we can format into an object that is parsed in the same way.
* general::SocketAddr: Format the unnamed address as "unix:"Nick Mathewson2024-10-161-5/+12
| | | | | This matches our parsing, and our general rule that our parser defers to SocketAddr::from_pathname.
* Add reverse-enginered description of Rust socketaddr formats.Nick Mathewson2024-10-161-0/+32
|
* general::SocketAddr: Add unit testsNick Mathewson2024-10-162-38/+70
|
* general::SocketAddr: Implement PartialEq.Nick Mathewson2024-10-161-0/+39
| | | | Needed for tests.
* general::SocketAddr: Specify and implement string representations.Nick Mathewson2024-10-161-1/+285
| | | | Closes #1681.
* tor-rtmock: dyn_time tests: rustfmtIan Jackson2024-10-081-3/+1
|
* tor-rtmock: dyn_time tests: Check DropCount on type-mismatch pathIan Jackson2024-10-081-1/+7
|
* tor-rtmock: dyn_time tests: Make try_downcast_string return S, not implIan Jackson2024-10-081-3/+3
| | | | | This will make it possible to use on a DropCounter and get a DropCounter back.
* tor-rtmock: dyn_time tests: Break out try_downcast_stringIan Jackson2024-10-081-8/+8
|
* tor-rtmock: dyn_time tests: Rename try_downcast_dc from chkIan Jackson2024-10-081-2/+2
| | | | This will be clearer
* Merge branch 'dyn-time' into 'main'Ian Jackson2024-10-019-3/+324
|\ | | | | | | | | Provide a type-erased SleepProvider + CoarseTimeProvider and use it for memquota queues See merge request tpo/core/arti!2460
| * tor-rtcompat: dyn_time: Combine test cases into module (fmt)Ian Jackson2024-10-011-27/+28
| |
| * tor-rtcompat: dyn_time: Combine test cases into moduleIan Jackson2024-10-011-7/+24
| |
| * tor-rtcompat: Test case demonstrating downcast_value doesn't dropIan Jackson2024-10-011-0/+25
| | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2460#note_3085583
| * tor-rtcompat: Comments about the implementation of downcast_valueIan Jackson2024-10-011-0/+18
| | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2460#note_3085582
| * tor-rtcompat: Comments about tradeoffs in special casing PreferredRuntimeIan Jackson2024-10-011-1/+14
| | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2460#note_3085581
| * tor-rtcompat: Introduce DynTimeProviderIan Jackson2024-09-263-0/+236
| | | | | | | | | | | | | | | | | | This will replace the internal ad-hoc DynCoarseTimeProvider in tor-memquota. We need this to be public because it's going to be shared by many of our protocol elements (eg ClientCirc, Channel, etc.) as they need to use it for their mq queues.
| * tor-memquota: mq_queue: Take Account by referenceIan Jackson2024-09-261-1/+3
| | | | | | | | | | | | It doesn't need an owned value here. (clippy's note about this was defeated by this being a trait method.)
| * CI: run miri, currently on tor-rtcompatIan Jackson2024-09-267-3/+12
| | | | | | | | | | | | I'm about to add some unsafe which I want tested in CI. We must disable two tests.
* | Merge branch 'unused' into 'main'David Goulet2024-10-011-0/+3
|\ \ | | | | | | | | | | | | Suppress some dead code warnings See merge request tpo/core/arti!2463
| * | tor-rtcompat: Suppress a dead code warningIan Jackson2024-09-301-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes cargo check --all-features -p tor-async-utils --all-targets which otherwise prints warning: function `new_unnamed_socketaddr` is never used --> crates/tor-rtcompat/src/unix.rs:14:15 | 14 | pub(crate) fn new_unnamed_socketaddr() -> std::io::Result<SocketAddr> { | ^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
* | Remove semver.md files from 1.2.8Nick Mathewson2024-09-301-7/+0
| |
* | Bump arti- and tor- crates to 0.23.0Nick Mathewson2024-09-301-2/+2
|/ | | | | | | | | | | | | | Per our policy, every one of these gets a minor bump. Generated with: ``` for crate in $(./maint/list_crates | grep '^\(tor\|arti\)-' ); do cargo set-version --bump minor -p $crate; done ``` (Note the use of `-` at the end end of the grep pattern to prevent matching the `arti` crate.)
* Merge branch 'msrv-1.77-and-rusqlite-update' into 'main'David Goulet2024-09-261-1/+1
|\ | | | | | | | | Upgrade MSRV to 1.77 , and rusqlite to 0.32.1 See merge request tpo/core/arti!2451
| * Upgrade MSRV to 1.77Nick Mathewson2024-09-251-1/+1
| | | | | | | | This will allow us to upgrade to the latest version of rusqlite.
* | Upgrade to derive_more version 1.0.0Nick Mathewson2024-09-252-4/+3
|/ | | | | | The `derive_more` crate broke backward compatibility with this version, so this change involved quite a few manual fixups. With luck, they'll keep compatibility for some while in the future.
* rtcompat: Finalize names for general::SocketAddr.Nick Mathewson2024-09-242-44/+52
|
* rtcompat: Expose FakeStream and friends; fix compilation in tor-rtmockNick Mathewson2024-09-243-10/+8
| | | | | It turns out that these types are generally useful, and that they are in fact needed for tor-rtmock to compile without a PreferredRuntime.
* rtcompat: Fix some rustdoc links.Nick Mathewson2024-09-244-6/+6
|
* rtcompat: remove async_trait from NetStreamListener.Nick Mathewson2024-09-245-5/+1
| | | | (The trait no longer has any async methods.)
* Make Runtime require NetStreamProvider<unix::SocketAddr>Nick Mathewson2024-09-245-8/+28
|
* rtcompat: initial implementation for "Abstract" addresses.Nick Mathewson2024-09-242-0/+147
| | | | | This is feature-complete, but will need tests. I'm holding off at this point so we can discuss naming on these types.