summaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/build.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-netdoc: Fix useless conversion warning.Gabriela Moldovan2025-02-241-1/+1
| | | | This fixes a warning that triggers on the latest stable release (1.85).
* PoW: Consolidate feature flags into a single flag.Wesley Aptekar-Cassels2024-11-251-2/+2
| | | | | | | | | | | | | | | | | This replaces the hs-pow, hs-pow-full, hs-pow-v1, pow-v1, and pow-full features with a single hs-pow-full feature. It's possible that in the future we will want to split different schemes into different features, but we can do that when it comes up. For now, having this as a single flag makes it clearer what's going on, since the previous thing was not actually expressive enough to capture some things we care about (like "at least one pow scheme is enabled" that works in a future-compatible way). This change is not semver breaking since it's a experimental feature. Related: #1751
* tor-netdoc: Support writing pow-params line.Wesley Aptekar-Cassels2024-11-251-1/+19
| | | | | | | I'm not particularly happy with the code that does the actual writing out of the pow-params line, in particular the error handling there seems very verbose. However, I don't know of a better way to structure it given that APIs I'm working with.
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* netdoc: refactor to use a let-else.Nick Mathewson2023-11-301-4/+1
|
* Fix unresolved reference in documentationhalcyon2023-10-231-1/+2
|
* Remove deprecated ItemArgument impl for SystemTimehalcyon2023-10-231-27/+1
|
* Fix unresolved link warninghalcyon2023-10-201-1/+1
|
* Add Test for different Netdoc ItemArgument time formatshalcyon2023-10-201-0/+29
|
* Implement Netdoc ItemArgument for Iso8601TimeNoSp and Iso8601TimeSphalcyon2023-10-201-2/+15
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* tor-bytes: deprecate always_bug with From traitEmil Engler2023-08-171-2/+1
| | | | | | This commit deprecates the `EncodeError::always_bug` function with a `From<EncodeError> for Bug` trait, which is a more semantically correct way to perform this action.
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* netdoc::build remove very broken example.Nick Mathewson2023-06-161-20/+3
| | | | | | | | | | | This could never be a full rustdoc test, since rustdoc never runs tests for private items. Even if it were a rustdoc test, it uses a bunch of types that aren't exposed in the right places, and it invokes nonexistent functions, and it assumes a `self` that isn't there. In lieu of writing a new untested test, I've added a note to refer the developer to where they can find working example code.
* netdoc::build: remove or narrow `allow`s.Nick Mathewson2023-06-141-12/+4
|
* Make the HS encoder randomness source injectable.Gabriela Moldovan2023-03-271-1/+2
| | | | | | | This makes it possible to plug in a deterministic randomness source for testing. Signed-off-by: Gabriela Moldovan <[email protected]>
* Remove `NetdocText` and replace its uses with `String`.Gabriela Moldovan2023-03-241-49/+6
| | | | | | | | `NetdocText` is a wrapper around a `String` and a type marker. The type annotation proved of limited use, and made the netdoc builder API somewhat awkward to use. Signed-off-by: Gabriela Moldovan <[email protected]>
* Add builder for encoding hidden service descriptors.Gabi Moldovan2023-03-241-2/+26
| | | | | | | | | | | | | | This introduces the `NetdocBuilder` trait described in `netdoc-builder.md` and a new `tor-netdoc::doc::hsdesc::build` module, which exports the `HsDescBuilder`. Hidden services will use `HsDescBuilder` to build and encode hidden service descriptors. There are several TODOs in the code that I'm planning to address separately. Partially addresses #745. Signed-off-by: Gabriela Moldovan <[email protected]>
* Implement `ItemArgument` for `String`.Gabriela Moldovan2023-03-241-0/+6
| | | | | | | This makes some code a bit more concise, as it allows us to make `Strings` into `ItemArgument`s without calling `.as_str()`. Signed-off-by: Gabriela Moldovan <[email protected]>
* Fix typosDimitris Apostolou2023-01-281-2/+2
|
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* netdoc builder: Add two TODOs, prompted by testing experienceIan Jackson2023-01-241-0/+6
|
* netdoc builder test: Make a bigger dummy document and test reparsingIan Jackson2023-01-241-2/+26
|
* netdoc builder: Implement object() and add one test caseIan Jackson2023-01-241-1/+50
|
* netdoc-builder: Initial test case (no object yet)Ian Jackson2023-01-241-0/+47
|
* netdoc-builder: Provide new() methodIan Jackson2023-01-241-0/+7
|
* netdoc-builder: Implement ItemArgument for more needed typesIan Jackson2023-01-241-5/+44
|
* netdoc-builder: Remove some obsolete commentsIan Jackson2023-01-241-11/+0
|
* netdoc-builder: Move example into implementation doc commentIan Jackson2023-01-241-2/+16
| | | | Not actually tested yet
* netdoc-builder: Implement most of the internal general doc builderIan Jackson2023-01-241-23/+83
|
* netdoc-builder api: Clarify docs for object()Ian Jackson2023-01-241-3/+8
|
* netdoc-builder api: Introduce ItemArgument traitIan Jackson2023-01-241-2/+32
|
* netdoc-builder api: Have .item() return ItemBuilderIan Jackson2023-01-241-1/+1
| | | | This was a slip in the design doc.
* netdoc-builder api: Abolish `K` generic on ItemEncoderIan Jackson2023-01-241-5/+7
| | | | | We're going to eagerly encode the keyword, so this will be easy. Removing the generic simplifies the API.
* netdoc-builder api: Don't promise to check args_raw_string valueIan Jackson2023-01-241-3/+0
|
* netdoc-builder api: Make ItemEncoder methods consume and return selfIan Jackson2023-01-241-2/+13
| | | | | | This will actually make the pattern in the example work. The mentioned `ItemArgument` trait will arrive soon.
* netdoc-builder api: Move internal API into actual code file (fmt)Ian Jackson2023-01-241-6/+7
|
* netdoc-builder api: Move internal API into actual code fileIan Jackson2023-01-241-0/+174
Motion, plus the bare minimum needed to make it compile.