summaryrefslogtreecommitdiff
path: root/crates/tor-netdoc
Commit message (Collapse)AuthorAgeFilesLines
...
* | | tor-netdoc: Small ItemPresent test fixClara Engler2026-06-091-1/+1
| | | | | | | | | | | | Adds the actual keyword for a present object to the test.
* | | tor-netdoc: Test for ItemPresentClara Engler2026-06-091-1/+89
| | | | | | | | | | | | | | | This commit adds a test for ItemPresent in terms of encoding and decoding.
* | | tor-netdoc: Add ItemPresent typeClara Engler2026-06-093-2/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the ItemPresent type, which is intended for token types where the mere presence implies a truthful value, such as `tunnelled-dir-server`. For now, it lives in `ignored_impls` because it does in fact ignore (actually rejects) everything around the item except the keyword. The type implements ItemValueParseable and ItemValueEncodable; both implementations being very minimal and only parsing/emitting the keyword. A test will be added within the next commit.
* | | tor-netdoc: Document Transparent shortcomingClara Engler2026-06-091-0/+3
| | | | | | | | | | | | | | | | | | | | | This commit documents a shortcoming explained on IRC that exists with the current derive(Transparent) and generic types that are uncovered. See E0210.
* | | Merge branch 'netdoc-small-fixes' into 'main'Clara Engler2026-06-093-4/+5
|\ \ \ | | | | | | | | | | | | | | | | tor-netdoc: minor fixes arising from netstatus work See merge request tpo/core/arti!4055
| * | | tor-netdoc: {required,recommended}-*-protocols: change orderingIan Jackson2026-06-031-2/+2
| | | | | | | | | | | | | | | | This matches C Tor and the spec.
| * | | tor-netdoc: {required,recommended}-*-protocols: fix encodingIan Jackson2026-06-031-1/+1
| | | | | | | | | | | | | | | | We need to use `-`, not `_`. So use concat! stringify!.
| * | | tor-netdoc: SoftwareVersion: fix Display implIan Jackson2026-06-031-0/+1
| | | | | | | | | | | | | | | | Now it round-trips.
| * | | tor-netdoc: fix a doc formatting typoIan Jackson2026-06-031-1/+1
| | |/ | |/|
* | | Merge branch 'parse-input-improve' into 'main'Clara Engler2026-06-092-0/+17
|\ \ \ | |_|/ |/| | | | | | | | tor-netdoc: ParseInput: improve See merge request tpo/core/arti!4057
| * | tor-netdoc: ParseInput: document changesIan Jackson2026-06-031-0/+1
| | |
| * | tor-netdoc: ParseInput: add retain_unknown_values convenience setterIan Jackson2026-06-031-0/+10
| | |
| * | tor-netdoc: ParseInput: add accessorsIan Jackson2026-06-031-1/+4
| | |
| * | tor-netdoc: ParseInput: add some blank linesIan Jackson2026-06-031-0/+2
| | | | | | | | | | | | | | | This makes the code clearer, especially since we're going to add attributes.
| * | tor-netdoc: ParseInput: impl Debug and CloneIan Jackson2026-06-031-0/+1
| |/
* | Merge branch 'portpolicy-split-ws' into 'main'Clara Engler2026-06-033-11/+22
|\ \ | | | | | | | | | | | | tor-netdoc: Avoid use of string slices in PortPolicy See merge request tpo/core/arti!4062
| * | tor-netdoc: Test for UTF-8 port policy edge case52252252026-06-033-0/+17
| | | | | | | | | | | | | | | | | | | | | This commit adds a tor-netdoc test for checking for an edge case related to UTF-8 symbols found within netdocs. See arti#2566
| * | tor-netdoc: Avoid use of string slices in PortPolicyClara Engler2026-06-031-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes the use of string slices in PortPolicy::from_str() by making use of `str::split_once` instead. See arti#2566 Co-authored-by: 5225225 <[email protected]>
* | | Merge branch 'no-result' into 'main'Clara Engler2026-06-033-38/+37
|\ \ \ | |_|/ |/| | | | | | | | tor-netdoc: No longer import crate::Result in doc::netstatus See merge request tpo/core/arti!4050
| * | tor-netdoc: netstatus: Abolish StdResult aliasIan Jackson2026-06-022-13/+12
| | |
| * | tor-netdoc: netstatus: No longer use crate::ResultIan Jackson2026-06-022-24/+24
| | |
| * | tor-netdoc: Change one call to use try_collect()Ian Jackson2026-06-021-1/+1
| | | | | | | | | | | | This is a clearer.
* | | Merge branch 'bump-deps' into 'main'Alexander Hansen Færøy2026-06-031-1/+1
|\ \ \ | |_|/ |/| | | | | | | | Bump some deps that have had breaking changes See merge request tpo/core/arti!4053
| * | dirserver,netdoc: Upgrade to the latest saturating-timeGabriela Moldovan2026-06-031-1/+1
| | |
* | | tor-netdoc: Add TODO for eventdnsClara Engler2026-06-031-0/+1
| | |
* | | tor-netdoc: Change Option<NumericBoolean> to NumericBooleanClara Engler2026-06-031-1/+2
| | | | | | | | | | | | | | | | | | It is weird to have three possible states for truthiness here. This commit removes the Option in favor of the inner type while adding a TODO comment to somehow find a way to skip this during encoding.
* | | tor-netdoc: Replace some item docs with spec linksClara Engler2026-06-031-6/+3
| | |
* | | tor-netdoc: Add TODO for overload_generalClara Engler2026-06-031-0/+1
| | | | | | | | | | | | Adds a TODO for using ConstantString for overload_general.
* | | tor-netdoc: Add extra_info_digest to RouterDescClara Engler2026-06-032-0/+9
| | | | | | | | | | | | This field is taken from the spec.
* | | tor-netdoc: Add contact to RouterDescClara Engler2026-06-032-0/+9
| | | | | | | | | | | | This commit adds the contact field to RouterDesc.
* | | tor-netdoc: Add overload_general to RouterDescClara Engler2026-06-032-0/+9
| | | | | | | | | | | | This commit adds support for the overload-general field to RouterDesc.
* | | tor-netdoc: Add hibernating field to RouterDescClara Engler2026-06-032-0/+9
|/ /
* | Merge branch 'netdoc-unverified-trait-name' into 'main'Clara Engler2026-06-038-22/+23
|\ \ | | | | | | | | | | | | tor-netdoc Rename NetdocUnverified trait to NetdocParseableUnverified See merge request tpo/core/arti!4043
| * | tor-netdoc: Add crate:: to docs xrefs to avoid broken linksIan Jackson2026-06-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, it is only correct to write [`NetdocParseableUnverified`](derive_deftly_template_NetdocParseableUnverified), *after* the definition of that template. Before then, the macro isn't in scope. Worse, rustdoc just treats it as a filename and doesn't spot the link, so you don't get any kind of warning. I think this is an upstream bug, https://github.com/rust-lang/rust/issues/157304 I found rustdoc's behaviour capricious. I don't intend to go through the arti tree right now looking for similar patterns. Instead let's hope the upstream bug gets fixed, and in the meantime do this crate:: thing when we notice we need it.
| * | tor-netdoc: Rename NetdocUnverified trait to NetdocParseableUnverified (fmt)Ian Jackson2026-06-022-6/+6
| | |
| * | tor-netdoc: Rename NetdocUnverified trait to NetdocParseableUnverifiedIan Jackson2026-06-028-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NetdocParseableUnverified derive macro implements this trait (amongst other things). Traits and derive macros should have aligned names. This is only used for parsing, so let's keep the "Parseable" part of the name. I don't think the effort of deprecated alias, for downstream compatibility, is worth it, our compatibility policy notwithstanding.
| * | tor-netdoc: Fix two references to NetdocUnverified d-d templateIan Jackson2026-06-021-2/+2
| |/ | | | | | | | | | | | | The trait is called NetdocUnverified, but the template is NetdocParseableUnverified. This fixes a dead docs link (which somehow isn't spotted by rustdoc, but is instead taken to refer to a nonexistent file).
* | tor-netdoc: ns_variety_definition_macros: Use coherent orderingIan Jackson2026-06-021-7/+7
| | | | | | | | | | | | | | | | At some earlier point in the development of this scheme, the ordering was different (as it is in poc). Update all the references in the docs, to the various varieties, so that they are always plain, md, vote, like ns_type! et al take.
* | tor-netdoc: ns_variety_definition_macros: Minor grammar fixIan Jackson2026-06-021-1/+1
| |
* | tor-netdoc: Remove a TODO that we've doneIan Jackson2026-06-021-1/+0
|/ | | | We do now support encoding.
* tor-netdoc: Add spec link for RelayPlatformClara Engler2026-06-021-0/+3
|
* tor-netdoc: Round-trip test for RelayPlatform encodingClara Engler2026-06-021-0/+7
|
* tor-netdoc: Implement Display for RelayPlatformClara Engler2026-06-022-0/+12
|
* tor-netdoc: Store platform of TorVersion in Option (fmt)Clara Engler2026-06-021-1/+3
| | | | No functional change, just rustfmt.
* tor-netdoc: Store platform of TorVersion in OptionClara Engler2026-06-022-7/+8
| | | | | | | | | This commit changes RelayPlatform::TorVersion to store the platform to an Option<String> instead of a String because storing a missing/not present platform as the empty String feels wrong in my opinion. Besides, we will soon need to add encoding for this type, making now a good time to change it.
* tor-netdoc: Refactor RelayPlatform testsClara Engler2026-06-021-21/+28
| | | | | | | | | | | | | | | This refactors the RelayPlatform test to store the test vectors in an array and iterate over it, comparing it with the expected output. This is a lot better than the current version, where there is not just a lot of copy and pasted code but also some tests that only check for an okay value. Unfortunately, there is not an easy way to review this with --color-moved or something. Personally, I would recommend to review each original test vector (i.e. a line starting with `let p =` followed by a string literal) and verify that the exact same string literal is still present within the new test vector. Afterwards, verifying the assertion logic should be easy, as it is a one-liner.
* Remove semver.md files post-releaseGabriela Moldovan2026-06-011-44/+0
|
* Bump all the unstable tor- and arti- crates to 0.43.0Gabriela Moldovan2026-06-011-13/+13
| | | | | | | | | | Done using: ``` for crate in $(./maint/list-crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.43.0 done ```
* tor-netdoc: Use spec comment for identity-ed25519Clara Engler2026-06-011-2/+1
|
* tor-netdoc: Small spelling fixClara Engler2026-06-011-1/+1
|