summaryrefslogtreecommitdiff
path: root/crates/tor-rtmock
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'versions' into 'main'Ian Jackson2024-10-301-8/+8
|\ | | | | | | | | Version bumps for release of 1.3.0 See merge request tpo/core/arti!2599
| * Bump minor versions of crates with new APIs/implsIan Jackson2024-10-301-1/+1
| | | | | | | | | | cargo set-version --bump=patch -p slotmap-careful cargo set-version --bump=patch -p safelog
| * Bump unstable tor-* and arti-* crates to 0.24.0Ian Jackson2024-10-301-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove re-export of "unix" from tor_rtcompat.Nick Mathewson2024-10-292-6/+8
|
* Convert a few crates to slotmap-carefulNeel Chauhan2024-10-173-6/+6
|
* tor-rtmock: Provide and use an mpsc::channel wrapper in tor-rtmockIan Jackson2024-10-153-3/+17
|
* tor-rtmock: Add some commentary about SleepLocationIan Jackson2024-10-081-0/+6
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2502#note_3090557
* tor-rtmock: Simplify two cfgIan Jackson2024-10-082-2/+1
| | | | | | Discussion here https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2502#note_3090554 https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2502#note_3090556
* tor-rtmock: Fix a memory leakIan Jackson2024-10-081-6/+20
| | | | | | Change the waker to have a weak reference to the executor. Detected by miri.
* tor-rtmock: miri: disable tests that use wallclock timeIan Jackson2024-10-086-3/+15
|
* tor-rtmock: Provide a fake SleepProvider for miriIan Jackson2024-10-081-0/+16
|
* tor-rtmock: Disable dead code warnings when not in a full buildIan Jackson2024-10-081-0/+3
|
* Bump arti- and tor- crates to 0.23.0Nick Mathewson2024-09-301-5/+5
| | | | | | | | | | | | | | 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.)
* Minor bumps on non-tor/arti cratesNick Mathewson2024-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates are not in the tor/arti namespace, but we have given them MSRV bumps: ``` oneshot-fused-workaround slotmap-careful fslock-guard hashx equix caret fs-mistrust safelog test-temp-dir retry-error ``` We are counting this as a breaking change. Since all of these crates are at 0.x.x, we have indicated the breaking change with a minor version bump. This commit was generated with the following script: ``` BUMPS=" oneshot-fused-workaround slotmap-careful fslock-guard hashx equix caret fs-mistrust safelog test-temp-dir retry-error " for crate in $BUMPS; do cargo set-version --bump minor -p $crate; done ```
* 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-251-1/+1
|/ | | | | | 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: Expose FakeStream and friends; fix compilation in tor-rtmockNick Mathewson2024-09-241-7/+4
| | | | | 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: remove async_trait from NetStreamListener.Nick Mathewson2024-09-241-1/+0
| | | | (The trait no longer has any async methods.)
* Make Runtime require NetStreamProvider<unix::SocketAddr>Nick Mathewson2024-09-241-0/+16
|
* Documentation updates for "NetStreamProvider" renameNick Mathewson2024-09-243-4/+5
| | | | | | Stop referring to TCP streams in its documentation; update other documentation to refer to NetStreamProvider rather than TcpProvider.
* rtcompat: Rename TcpProvider to NetStreamProvider.Nick Mathewson2024-09-242-16/+16
| | | | | | | | | | | | | | (And similarly rename TcpListener to NetStreamListener, along with their TcpStream/TcpListener associated types.) These types are about to become generic over addresses, and therefore shouldn't be named after TCP. Renaming was done mostly with Rust Analyzer, except for some macros that needed to be hand-edited. (I'll revise the comments in the next commit; this one is all about renaming.)
* rtcompat: Remove accept() from TcpListenerNick Mathewson2024-09-243-18/+15
| | | | | | | | | | It's redundant with the incoming() method (which turns the TcpListener into a Stream of connections), and nothing actually used it outside of tests. Removing this method allows us to simplify our TcpListener code a good deal, as can be seen by some of the implementations we removed from our example and testing code.
* Bump MSRV from 1.70 to 1.75.Wesley Aptekar-Cassels2024-09-161-1/+1
|
* Bump all the unstable tor- and arti- crates to 0.22.0.Gabriela Moldovan2024-09-031-5/+5
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.22.0 done ```
* oneshot-fused-workaround: Set the initial version to 0.1.0.Gabriela Moldovan2024-09-031-1/+1
| | | | This is the first time we're publishing this, so let's start at 0.1.0.
* Run fixup-features in preparation for release.Gabriela Moldovan2024-09-031-1/+1
|
* tor-rtmock: remove dependency on tor-async-utilsJim Newsome2024-08-281-2/+1
| | | | | Now that `oneshot-fused-workaround` is its own crate, `tor-rtmock` doesn't need `tor-async-utils`.
* extract tor_async_utils::oneshot into ::oneshot-fused-workaroundJim Newsome2024-08-284-3/+5
| | | | | | | | | | | | | | Having this in the `tor-async-utils` crate prevents us from doing both of the following without introducing a circular dependency: * using it in `tor-rtmock` (which we currently do, particularly in tests). * using `tor-rtmock` to test things in `tor-async-utils`. We don't do this yet, but it is generally sensible to do so. In particular we want to move the `stream_peak` module there, which is currently tested with `tor-rtmock`. Moving this into its own crate avoids this circular dependency.
* Merge branch '1144-std-backtrace' into 'main'David Goulet2024-08-122-35/+9
|\ | | | | | | | | | | | | Use std::backtrace instead of backtrace crate Closes #1144 See merge request tpo/core/arti!2301
| * Match previous backtrace formattingRobin Leander Schröder2024-08-081-1/+1
| | | | | | | | | | std::backtrace::Backtrace's Display looks the same as backtrace_rs::Backtrace's Debug
| * Use std::backtrace instead of backtrace crateRobin Leander Schröder2024-08-012-34/+8
| | | | | | | | | | Removes resolve_backtraces from rtmock since it is no longer needed as stdlib's backtraces automatically lazily resolve without needing a &mut.
* | Don't need to tell docs.rs to enable `docsrs` cfgKunal Mehta2024-08-021-1/+0
| | | | | | | | | | It now does it automatically, see <https://docs.rs/about/builds#detecting-docsrs>.
* | Bump versions for tor- and arti- crates to 0.21.0Nick Mathewson2024-08-011-6/+6
|/ | | | | | | | | | This is the result of: ``` for crate in $( ./maint/list_crates |grep '^\(tor\|arti-\)' ); do cargo set-version -p $crate 0.21.0 done ```
* tor-rtmock docs: Add some more discussion of the simulated timeIan Jackson2024-07-301-1/+17
|
* tor-rtmock docs: We have CoarseTimeProvider nowIan Jackson2024-07-301-2/+3
| | | | Improve/replace some out-of-date notes in the docs.
* Update to derive-deftly 0.14Ian Jackson2024-07-081-1/+1
| | | | | This removes the deprecated syntaxes. Updating now will prevent us re-introducing the old syntaxes, which we updated in arti!2209.
* Update versions of 0.x tor-* and arti-* cratesIan Jackson2024-06-271-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nailing-cargo -uE set-version -p arti-client 0.20.0 nailing-cargo -uE set-version -p arti-relay 0.20.0 nailing-cargo -uE set-version -p arti-rpcserver 0.20.0 nailing-cargo -uE set-version -p tor-async-utils 0.20.0 nailing-cargo -uE set-version -p tor-basic-utils 0.20.0 nailing-cargo -uE set-version -p tor-bytes 0.20.0 nailing-cargo -uE set-version -p tor-cell 0.20.0 nailing-cargo -uE set-version -p tor-cert 0.20.0 nailing-cargo -uE set-version -p tor-chanmgr 0.20.0 nailing-cargo -uE set-version -p tor-checkable 0.20.0 nailing-cargo -uE set-version -p tor-circmgr 0.20.0 nailing-cargo -uE set-version -p tor-config 0.20.0 nailing-cargo -uE set-version -p tor-consdiff 0.20.0 nailing-cargo -uE set-version -p tor-dirclient 0.20.0 nailing-cargo -uE set-version -p tor-dirmgr 0.20.0 nailing-cargo -uE set-version -p tor-error 0.20.0 nailing-cargo -uE set-version -p tor-geoip 0.20.0 nailing-cargo -uE set-version -p tor-guardmgr 0.20.0 nailing-cargo -uE set-version -p tor-hsclient 0.20.0 nailing-cargo -uE set-version -p tor-hscrypto 0.20.0 nailing-cargo -uE set-version -p tor-hsrproxy 0.20.0 nailing-cargo -uE set-version -p tor-hsservice 0.20.0 nailing-cargo -uE set-version -p tor-keymgr 0.20.0 nailing-cargo -uE set-version -p tor-linkspec 0.20.0 nailing-cargo -uE set-version -p tor-llcrypto 0.20.0 nailing-cargo -uE set-version -p tor-log-ratelim 0.20.0 nailing-cargo -uE set-version -p tor-memquota 0.20.0 nailing-cargo -uE set-version -p tor-netdir 0.20.0 nailing-cargo -uE set-version -p tor-netdoc 0.20.0 nailing-cargo -uE set-version -p tor-persist 0.20.0 nailing-cargo -uE set-version -p tor-proto 0.20.0 nailing-cargo -uE set-version -p tor-protover 0.20.0 nailing-cargo -uE set-version -p tor-ptmgr 0.20.0 nailing-cargo -uE set-version -p tor-relay-selection 0.20.0 nailing-cargo -uE set-version -p tor-rpcbase 0.20.0 nailing-cargo -uE set-version -p tor-rtcompat 0.20.0 nailing-cargo -uE set-version -p tor-rtmock 0.20.0 nailing-cargo -uE set-version -p tor-socksproto 0.20.0 nailing-cargo -uE set-version -p tor-units 0.20.0 Each of which runs a rune like cargo set-version --offline -p tor-units 0.20.0
* Update to itertools 0.13.0Ian Jackson2024-06-251-1/+1
| | | | | | | No code changes needed. Precisely nailing-cargo -Eu upgrade --incompatible -p itertools
* Require strum 0.26.3Ian Jackson2024-06-251-1/+1
| | | | | | | | | | | | We're about to update to iterools 0.13.0. We must therefore have a version of strum which is not affected by https://github.com/Peternator7/strum/issues/358 Precisely git-grep -l '^strum' | xargs perl -i~ -pe 's{"0\.26"}{"0.26.3"}' No changes to lockfile - we're already using 0.26.3, except perhaps in the minimal versions test.
* Update to derive-deftly 0.13.0Ian Jackson2024-06-251-1/+1
| | | | | | | No code changes needed. Precisely nailing-cargo -Eu upgrade --incompatible -p derive-deftly
* tls: Support export keying material (RFC 5705)David Goulet2024-06-182-0/+15
| | | | | | | | | | | | | Add a function to get the keying material as detailed by RFC 5705. Because native-tls doesn't have such support, there is a place holder panic!() for now. This means that for the forseable future, relay would only work with rustls until we figure out a solution for native-tls. Closes #1432 Signed-off-by: David Goulet <[email protected]>
* Change deftly syntax to post 0.12.1 versionIan Jackson2024-06-172-2/+2
| | | | | | | | | | | * Change `pub` to `export` * Change the `=` in define to `:` * Change `pub_template_semver_check` to `template_export_semver_check` Right now, 0.12.1 supports both syntaxes. I have verified this branch also compiles with https://gitlab.torproject.org/Diziet/rust-derive-deftly/-/merge_requests/402 ee171ffaf56d7dcb7d75584054921153fe19b222
* Update to derive-deftly 0.12.1Ian Jackson2024-06-171-1/+1
| | | | | | * Bump in Cargo.toml * Deal with `${Xmeta as ...}` incompatible change, by always specifying an `as`, and changing `as tokens`.
* Bump all the unstable tor- and arti- crates to 0.19.Gabriela Moldovan2024-06-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unstable crates are: - tor-error - tor-config - tor-units - tor-geoip - tor-rtcompat - tor-rtmock - tor-log-ratelim - tor-rpcbase - tor-memquota - tor-llcrypto - tor-protover - tor-bytes - tor-hscrypto - tor-socksproto - tor-checkable - tor-cert - tor-linkspec - tor-cell - tor-proto - tor-netdoc - tor-consdiff - tor-netdir - tor-relay-selection - tor-persist - tor-chanmgr - tor-ptmgr - tor-guardmgr - tor-circmgr - tor-dirclient - tor-dirmgr - tor-keymgr - tor-hsclient - tor-hsservice - tor-hsrproxy - arti-client - arti-rpcserver - arti-hyper - tor-basic-utils - tor-async-utils Done using ``` for p in "${unstable[@]}"; do cargo set-version -p $p 0.19; done ``` where `unstable` contains the list above
* Upgrade to latest priority-queue.Nick Mathewson2024-05-311-1/+1
|
* Re-run maint/add_warning.Nick Mathewson2024-05-061-2/+2
| | | | This commit is automatically generated.
* Bump versions of 0.x tor-* and arti-* cratesIan Jackson2024-04-301-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for p in `cat ../u`; do cargo set-version --locked --offline -p $p; done where u contains tor-basic-utils tor-async-utils tor-error tor-config tor-units tor-geoip tor-rtcompat tor-rtmock tor-log-ratelim tor-rpcbase tor-memquota tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-hyper
* Suppress a spurious dead code lintIan Jackson2024-04-251-0/+1
|