aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-memquota
Commit message (Collapse)AuthorAgeFilesLines
...
* Enable derive-deftly beta featuresIan Jackson2025-02-121-1/+1
| | | | | | | | Right now this will give us `${Xmeta as ... default ...}`, which may improve things in the future. The Cargo.toml syntax is precisely that from https://docs.rs/derive-deftly/1.0.0/derive_deftly/doc_changelog/index.html#t:beta
* Update to derive-deftly 1.0Ian Jackson2025-02-121-1/+1
| | | | | | | | | This is released now. Prepared with: cargo upgrade -i -p derive-deftly There is some new duplication now I think mostly because pwd-grp uses old derive-deftly.
* Version bumps to 0.27.0Ian Jackson2025-02-061-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See Release.md. maint/list_crates | grep -P '^tor-|^arti-' | xargs -n1 nailing-cargo -Eu set-version --bump minor -p This completes the version bumps. The report of changed crates, before I started the release work, is: $ maint/changed_crates -v "arti-v$LAST_VERSION" oneshot-fused-workaround: No change. slotmap-careful: No change. test-temp-dir: No change. fslock-guard: No change. hashx: No change. equix: No change. tor-basic-utils: No change. caret: No change. fs-mistrust safelog: No change. retry-error: No change. tor-error tor-general-addr: No change. tor-geoip: No change. tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim: No change. tor-rpcbase tor-memquota: No change. tor-units tor-llcrypto: No change. tor-protover: No change. tor-bytes tor-checkable: No change. tor-cert tor-key-forge tor-hscrypto: No change. tor-socksproto: No change. tor-linkspec: No change. tor-cell: No change. tor-proto tor-netdoc: No change. tor-consdiff: No change. tor-netdir tor-relay-selection: No change. tor-persist tor-chanmgr tor-ptmgr: No change. tor-guardmgr: No change. tor-circmgr tor-dirclient: No change. tor-dirmgr: No change. tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy: No change. tor-relay-crypto arti-client arti-relay arti-rpcserver arti arti-rpc-client-core $
* Bump versions of internal arti crates for Arti 1.3.2Nick Mathewson2025-01-071-10/+10
| | | | | | | | | | | | | The affected crates follow our regular versioning. They all get bumped to 0.26.0. Done with ``` for crate in $(./maint/list_crates |grep '^arti-\|tor-' ); do cargo set-version --bump minor -p $crate; done ```
* Merge branch 'mod-module-files' into 'main'Nick Mathewson2025-01-071-0/+1
|\ | | | | | | | | clippy: deny `mod_module_files` See merge request tpo/core/arti!2689
| * clippy: deny `mod_module_files`Steven Engler2025-01-061-0/+1
| | | | | | | | | | | | Denies 'mod.rs' files for consistency. https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
* | fix: fix typosDimitris Apostolou2025-01-061-1/+1
|/
* Upgrade to itertools 0.14.0Nick Mathewson2025-01-061-1/+1
|
* add_warnings, *: Allow clippy::needless_lifetimesNick Mathewson2024-12-031-0/+1
| | | | | | | | In 1.83, this warning triggers on many of our crates. We're thinking of fixing them all, but for now, we're going to disable the warning. This is part of #1765.
* Bump all the unstable tor- and arti- crates to 0.25.0.Gabriela Moldovan2024-12-021-10/+10
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.25.0 done ```
* Bump the versions of the non-{arti-,tor-} crates.Gabriela Moldovan2024-12-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list_crates | rg -v '^(tor|arti)' oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error ``` We split them in the following categories: * crates with no changes (no version bumps): ``` maint/changed_crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-' oneshot-fused-workaround: No change. test-temp-dir: No change. caret: No change. ``` * crates that only have non-functional changes (bump the patch version): - slotmap-careful - fslock-guard - hashx - equix - fs-mistrust - safelog - retry-error * crates where APIs were broken (bump minor): None The bumps from this commit were created using this script: ``` PATCH=" slotmap-careful fslock-guard hashx equix fs-mistrust safelog retry-error " for crate in $PATCH; do cargo set-version --bump patch -p $crate; done ```
* cargo: Update `thiserror` to `2`Clara Engler2024-11-121-1/+1
|
* Merge branch 'versions' into 'main'Ian Jackson2024-10-301-12/+12
|\ | | | | | | | | 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-2/+2
| | | | | | | | | | 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-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-features (formatting)Ian Jackson2024-10-301-1/+2
| | | | | | | | Manual fixup. I filed #1719 about the fact that I had to do this.
* | 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.
* tor-memquota: Declare memquota feature stable, and defaultIan Jackson2024-10-222-2/+28
| | | | | | | | And document the Cargo features. This compiles in the memquota support for people who depend directly on tor-memquota. But all our in-tree dependencies turn off default features, so this doesn't have any effect for in-tree crates.
* Merge branch 'mq-fix' into 'main'Ian Jackson2024-10-224-4/+28
|\ | | | | | | | | memquota: Fix account lifetime bugs, and arrange to test mq in shadow See merge request tpo/core/arti!2560
| * tor-memquota: Fix rustfmt-damaged indentationIan Jackson2024-10-221-5/+5
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2560#note_3097189
| * memquota: Fix error message stringsIan Jackson2024-10-211-2/+2
| | | | | | | | | | These errors aren't necessarily memory pressure. They can occur due to bugs, and during teardown.
| * memquota: In debug builds, reliably detect use of dropped AccountIan Jackson2024-10-211-0/+13
| | | | | | | | | | This detects the bugs I have just fixed - in Shadow tests with the feature enabled and a (large) limit set.
| * memquota: Fix a test not to rely on accessing cache with dead AccountIan Jackson2024-10-211-1/+1
| |
| * memquota: Log a trace message when a claim failsIan Jackson2024-10-212-1/+9
| |
| * memquota: Log a message at info on startup, if enabledIan Jackson2024-10-211-0/+3
| |
* | Merge branch 'bug1531' into 'main'Ian Jackson2024-10-216-17/+17
|\ \ | |/ |/| | | | | | | | | Move crates to crates to slotmap-careful Closes #1531 See merge request tpo/core/arti!2530
| * Convert a few crates to slotmap-carefulNeel Chauhan2024-10-176-17/+17
| |
* | memquota: suppress clippy::single_match warning.Nick Mathewson2024-10-171-0/+1
|/ | | | | "Suppress" rather than "fix": this pattern is intentional, and makes it clear that we're doing an exhaustive match.
* Merge branch 'mq-prevent' into 'main'Ian Jackson2024-10-153-2/+4
|\ | | | | | | | | | | | | Use clippy to prevent non-mq use of mpsc::channel Closes #1659 See merge request tpo/core/arti!2536
| * Introduce mpsc_channel_no_memquota and use it in the places it's wanted (fmt)Ian Jackson2024-10-151-1/+2
| |
| * Introduce mpsc_channel_no_memquota and use it in the places it's wantedIan Jackson2024-10-153-2/+3
| | | | | | | | | | These are the call sites where using this fucntion is correct. (Outside tor-rtmock, which we'll do separately.)
* | memquota: Change ToplevelAccount to be an alias for Arc<MemoryQuotaTracker>Ian Jackson2024-10-152-1/+2
| | | | | | | | Fixes a TODO.
* | memquota: Provide a method Arc::<MemoryQuotaTracker>::new_noop()Ian Jackson2024-10-151-1/+15
|/ | | | | | | We'll need this to allow `ToplevelAccount::new_noop` (eg, in tests) when the type of ToplevelAccount changes. We have to do this via an extension trait.
* Merge branch 'mq-doc' into 'main'Ian Jackson2024-10-093-28/+13
|\ | | | | | | | | | | | | memquota architecture documentation Closes #1660 See merge request tpo/core/arti!2509
| * memquota: Further docs tweaksIan Jackson2024-10-091-2/+3
| |
| * mq docs: Add some cross-references from tor-memquota to tor-protoIan Jackson2024-10-072-0/+8
| | | | | | | | These can't be rustdoc links because they point up the crate hierarchy.
| * mq docs: Add a linkIan Jackson2024-10-071-1/+1
| |
| * mq docs: Move arti queues text to tor_proto::memquotaIan Jackson2024-10-071-24/+0
| |
| * mq docs: Uncomment docs about mq_queue, and remove the TODOIan Jackson2024-10-071-4/+4
| |
* | tor-memquota: miri: disable tests that use coarsetimeIan Jackson2024-10-083-3/+9
|/
* Merge branch 'mcost' into 'main'Ian Jackson2024-10-025-5/+375
|\ | | | | | | | | Implement tor_memquota:HasMemory cost for a lot of types See merge request tpo/core/arti!2459
| * tor-memquota: Fix more hard tabs.Ian Jackson2024-10-021-2/+2
| |
| * tor-memquota: Replace MemoryCostStructuralCopy with assert_copy_static (fmt)Ian Jackson2024-10-021-1/+1
| |
| * tor-memquota: Replace MemoryCostStructuralCopy with assert_copy_staticIan Jackson2024-10-022-23/+13
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2459#note_3086841
| * tor-memquota: Move and reword a commentIan Jackson2024-10-021-3/+5
| | | | | | | | | | | | This comment is more applicable to the memory_cost_structural_copyx macro than the wrapper type, especially since the wrapper type is going away.
| * tor-memquota: Add an example for HasMemoryCost deriveIan Jackson2024-10-022-0/+40
| |
| * Abolish SIZE in favour of std::mem::size_ofIan Jackson2024-10-022-22/+10
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2459#note_3086837
| * tor-memquota: Provide explicit "indirect size" feature in deriveIan Jackson2024-10-021-0/+6
| |
| * Use std::num::NonZeroFooIan Jackson2024-10-021-4/+5
| | | | | | | | | | | | | | Not the generic version which isn't supported in our MSRV. We may want to revert this in the future, so let's make it a separate commit.
| * tor-memquota: Export Account at the toplevelIan Jackson2024-10-021-1/+1
| | | | | | | | | | It turns out we're mostly going to want to deal in Accounts, not Arc<MemoryQuotaaTracker>s.