summaryrefslogtreecommitdiff
path: root/crates/tor-rtcompat
Commit message (Collapse)AuthorAgeFilesLines
* Bump minor version of tor-rtcompat and most of its dependentsNick Mathewson2022-10-031-1/+1
| | | | | | | (Since the APIs for the `Schedule::sleep*` functions changed, this is a breaking change in tor-rtcompat. Therefore, the Runtime trait in tor-rtcompat is now a different trait. Therefore, anything that uses the Runtime trait in its APIs has also broken.)
* `TaskSchedule`: give error on `sleep*()` if last handle is droppedNick Mathewson2022-09-073-5/+30
| | | | | | | | | | | | | | | | | | This fixes an busy-loop. When the last `TaskHandle` on a `TaskSchedule` is dropped, the schedule is permanently canceled: whatever operation it was scheduling should no longer be performed. But our code was broken: the `sleep()` and `sleep_until_wallclock()` functions don't verify whether the handles are dropped or not. This breakage caused an CPU-eating busy-loop in `sleep_until_wallclock`. With this patch, we now return a `Result<(), SleepError>` from these functions. Fixes #572.
* Remove semver.md from arti-1.0.0Nick Mathewson2022-09-071-1/+0
|
* Bump crate versions in preparation for Arti 1.0.0 release.Nick Mathewson2022-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we want to work more on ensuring that our semver stability story is solid, we are _not_ bumping arti-client to 1.0.0 right now. Here are the bumps we _are_ doing. Crates with "minor" bumps have had API breaks; crates with "patch" bumps have had new APIs added. Note that `tor-congestion` is not bumped here: it's a new crate, and hasn't been published before. ``` tor-basic-utils minor fs-mistrust minor tor-config minor tor-rtcompat minor tor-rtmock minor tor-llcrypto patch tor-bytes patch tor-linkspec minor tor-cell minor tor-proto minor tor-netdoc patch tor-netdir minor tor-persist patch tor-chanmgr minor tor-guardmgr minor tor-circmgr minor tor-dirmgr minor arti-client minor arti-hyper minor arti major arti-bench minor arti-testing minor ```
* add feature annotation not added by doc_auto_cfgtrinity-1686a2022-08-242-0/+2
|
* enable doc_auto_cfg feature on every crate when documenting for docs.rstrinity-1686a2022-08-242-0/+4
|
* Add a semver note for TcpStream send conversion.Nick Mathewson2022-08-151-0/+1
|
* tor-rtcompat: Require that TcpStream be SendIan Jackson2022-08-152-2/+2
| | | | The lack of this seems to have been an oversight.
* tor-rtcompat: s/micros/millis inside a flaky testeta2022-07-261-1/+1
| | | | | | | | | | The other tests wait for 100 milliseconds; this one waits for 100 *microseconds* for some reason, which meant it was understandably flaky if run on anything less than perfect conditions (arti#515). This is probably a typo, so just change it. fixes arti#515
* Remove semver.md files now that 0.5.0 is outNick Mathewson2022-06-241-1/+0
|
* Bump crate and dependency versions.Nick Mathewson2022-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were done with the following commands: ``` cargo set-version -p tor-basic-utils --bump patch cargo set-version -p fs-mistrust --bump minor cargo set-version -p tor-error --bump patch cargo set-version -p tor-config --bump patch cargo set-version -p tor-units --bump patch cargo set-version -p tor-rtcompat --bump minor cargo set-version -p tor-llcrypto --bump patch cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-cert --bump minor cargo set-version -p tor-cell --bump minor cargo set-version -p tor-proto --bump minor cargo set-version -p tor-netdoc --bump patch cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-persist --bump patch cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump patch cargo set-version -p tor-dirclient --bump patch cargo set-version -p tor-dirmgr --bump minor cargo set-version -p arti-client --bump patch cargo set-version -p arti --bump minor cargo set-version -p arti-bench --bump minor cargo set-version -p arti-testing --bump minor ```
* Merge branch 'clippy' into 'main'Ian Jackson2022-06-241-0/+3
|\ | | | | | | | | Fix clippy nightly again See merge request tpo/core/arti!603
| * Run maint/add_warning crates/*/src/{lib,main}.rsIan Jackson2022-06-231-0/+3
| | | | | | | | Update all lint blocks
* | Update README.md files from rustdoc.Nick Mathewson2022-06-241-1/+3
|/
* Remove rustls from tor-rtcompat/fullNick Mathewson2022-06-162-2/+4
| | | | This is another consequence of the `ring` license issue; see #493.
* Merge branch 'high-level-features' into 'main'Nick Mathewson2022-06-161-0/+2
|\ | | | | | | | | | | | | Add "full" and "experimental" features to arti, arti-client, and below. Closes #499 See merge request tpo/core/arti!584
| * Add "full" and "experimental" features to arti-client and below.Nick Mathewson2022-06-101-0/+2
| | | | | | | | | | | | | | | | | | The "full" feature is a catch-all for all features, _except_: * Those that select a particular implementation (like tor-llcrypto/with-openssl) or build flag (like "static") * Those that are experimental or unstable (like "experimental-api") * Those that are testing-only.
* | Merge branch 'dormant_directory' into 'main'Nick Mathewson2022-06-132-2/+118
|\ \ | |/ |/| | | | | | | | | Use TaskSchedule to sleep in directory bootstrapping Closes #497 See merge request tpo/core/arti!571
| * TaskSchedule: Add a sleep_until_wallclock method too.Nick Mathewson2022-06-102-2/+15
| |
| * Add a `sleep` function to TaskSchedule.Nick Mathewson2022-06-071-0/+20
| | | | | | | | | | Having this alias makes it easier to implement more complex schedules, like those used in DirMgr.
| * Add "suspend" and "resume" to TaskSchedule.Nick Mathewson2022-06-071-0/+83
| | | | | | | | | | | | Unlike "cancel" and "fire", "suspend" and "resume" don't change any pending timers or events: they just prevent execution of those events for a while, and let them resume later on.
* | Document semver changesIan Jackson2022-06-081-0/+1
| |
* | rt-compat: Make all the individual runtime traits Clone+Send etc.Ian Jackson2022-06-084-6/+18
|/ | | | | | | | This will make it much more convenient for code that only wants one of these traits (or a subset of them). This is a good thing to support because it will allow us to use a ZST in places that do not need an actual async runtime handle (typically, the runtime handle is needed only for spawn).
* lints: Add let_unit_value allow to all cratesIan Jackson2022-05-311-0/+1
| | | | | From running add_warning, with manual picking of the right hunks/lines.
* lints: Add lint block delimiters to every crateIan Jackson2022-05-311-0/+2
| | | | | | This was the result of: maint/add_warning crates/*/src/{lib,main}.rs and then manually curating the results.
* Merge branch 'post-release-fix-20220527' into 'main'Ian Jackson2022-05-301-0/+1
|\ | | | | | | | | Fix minor issues found while publishing crates for Arti 0.4.0 See merge request tpo/core/arti!547
| * tor-rtcompat: Fix a warning when building with no backends.Nick Mathewson2022-05-271-0/+1
| | | | | | | | | | | | | | | | Cargo publish (and probably nobody else!) builds this crate with no features enabled. When you do that, you get a warning about an unused `use std::io`. Fixing that.
* | Lexically sort Cargo.toml dependenciesOrhun Parmaksız2022-05-281-10/+6
|/ | | | | | Utilize cargo-sort: https://github.com/DevinR528/cargo-sort Signed-off-by: Orhun Parmaksız <[email protected]>
* Semantic version changes for Arti 0.4.0 releaseNick Mathewson2022-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | I followed the following procedure to make these changes: * I used maint/changed_crates to find out which crates had changed since 0.3.0. * I used grep and maint/list_crates to sort those crates in topological (dependency) order. * I looked through semver_status to find which crates were listed as having semver-relevant changes (new APIs and breaking changes). * I scanned through the git logs of the crates with no semver-relevant changes listed to confirm that, indeed, they had no changes. For those crates, I incremented their patch-level version _without_ changing the version that other crates depend on. * I scanned through the git logs of the crates with no semver-relevant changes listed to confirm that, indeed, they had no obvious breaking changes. * I treated all crates that depend on `arti` and/or `arti-client` as having breaking changes. * I identified crates that depend on crates that have changed, even if they have not changed themselves, and identified them as having a non-breaking change. * For all of the crates, I used `cargo set-version -p $CRATE --bump $STATUS` (where `STATUS` is `patch` or `minor`) to update the versions, and the depended-upon versions.
* Improve documentation around Cargo features; make Runtime require Debugeta2022-05-111-0/+3
| | | | | | | | | | | | | | - arti#445 highlighted the lack of good documentation around Arti's multiple runtime support, as well as it being difficult to determine what runtime was actually in use. - Improve the documentation to solve the first problem. - To solve the second problem, make Runtime require Debug (which is arguably a good idea anyway, since it makes them easier to embed in things), and print out the current runtime's Debug information when arti is invoked with `--version`. - (It also prints out other Cargo features, too!) fixes arti#445
* tor-rtcompat: make CompoundRuntime handle SleepProviders properlyeta2022-05-101-0/+11
| | | | | | Previously, CompoundRuntime would use the default implementations of SleepProvider::now() and ::wallclock(), instead of using its wrapped SleepProvider. This mildly embarrassing omission has been rectified.
* Bump the version of every* crate to 0.3.0Nick Mathewson2022-05-061-1/+1
| | | | * Except for safelog and fs-mistrust, which are new.
* Update README.md files (automated).Nick Mathewson2022-05-061-3/+3
|
* Fix grammar and typosSamanta Navarro2022-04-271-3/+3
|
* Bump async_executors to 0.6Nick Mathewson2022-04-261-1/+1
|
* Bump every crate's edition to 2021.Nick Mathewson2022-04-251-1/+1
| | | | | | | | | | This is an automated change made with a perl one-liner and verified with grep -L and grep -l. Some warnings are introduced with this change; they will be removed in subsequent commits. See arti#208 for older discussion on this issue.
* Add 'rust-version = "1.56"' to every Cargo.toml file.Nick Mathewson2022-04-251-0/+1
| | | | | | | This change was made automatically with a perl one-liner, and confirmed with `grep -L`. The `rust-version` field itself was introduced in 1.56.0.
* Reformat all not-yet-reformatted Cargo.toml files.Nick Mathewson2022-04-251-12/+19
| | | | | There are no semantic changes here; only formatting. This is in preparation for other changes (wrt MSRV and edition)
* Bump all arti*, tor* crates to 0.2.0Nick Mathewson2022-04-011-1/+1
| | | | | | | | Not all of these strictly need to be bumped to 0.2.0; many could go to 0.1.1 instead. But since everything at the tor-rtcompat and higher layers has had breaking API changes, it seems not so useful to distinguish. (It seems unlikely that anybody at this stage is depending on e.g. tor-protover but not arti-client.)
* Merge branch 'disallowed_lint' into 'main'eta2022-03-302-2/+0
|\ | | | | | | | | Remove allow(clippy::disallowed_methods) lint flag. See merge request tpo/core/arti!437
| * Remove allow(clippy::disallowed_methods) lint.Nick Mathewson2022-03-302-2/+0
| |
* | Make daemon tasks self-contained; introduce NetDirProvidereta2022-03-301-0/+6
|/ | | | | | | | | | | | | | | The various background daemon tasks that `arti-client` used to spawn are now handled inside their respective crates instead, with functions provided to spawn them that return `TaskHandle`s. This required introducing a new trait, `NetDirProvider`, which steals some functionality from the `DirProvider` trait to enable `tor-circmgr` to depend on it (`tor-circmgr` is a dependency of `tor-dirmgr`, so it can't depend on `DirProvider` directly). While we're at it, we also make some of the tasks wait for events from the `NetDirProvider` instead of sleeping, slightly increasing efficiency.
* Merge branch 'no-system-time' into 'main'eta2022-03-303-3/+5
|\ | | | | | | | | | | | | Don't use SystemTime::now() Closes #306 See merge request tpo/core/arti!365
| * use wallclock where possible in teststrinity-1686a2022-02-262-3/+4
| |
| * remove most usage of SystemTime::nowtrinity-1686a2022-02-251-0/+1
| |
* | tor-rtcompat/scheduler: add unit tests, FireIn -> FireAteta2022-03-242-7/+142
| | | | | | | | | | Addressing review comments: added some unit tests for the new scheduler type, and made FireIn use an Instant instead (making it FireAt).
* | Implement a periodic task scheduler, and a basic dormant modeeta2022-03-232-0/+149
| | | | | | | | | | | | | | | | | | | | | | This is a revised version of !397; it implements a scheduling system for periodic tasks that can be externally controlled, and then uses the external control aspect to implement a basic dormant mode (#90). More technically, the scheduling system consists of a `Stream` that periodic tasks are expected to embed in a `while` loop or similar, a way for tasks themselves to choose how long to wait until the stream next yields a result, and a handle to control this outside of the task.
* | UdpSocket: remove support for connect().Nick Mathewson2022-03-183-47/+10
| | | | | | | | | | | | | | | | Currently, Arti doesn't need this. But once it does, it will be way better to have a separate type for connected sockets, rather than having to error-check every time somebody gives us a socket. Part of #410
* | add simple unit test on UDPtrinity-1686a2022-03-144-2/+47
| |
* | fix typos and minor issuestrinity-1686a2022-03-141-1/+1
| |