Skip to content

Use internal Url struct in favor of url::Url to minimize the url dep in payjoin#1377

Open
benalleng wants to merge 10 commits intopayjoin:masterfrom
benalleng:url-rewrite
Open

Use internal Url struct in favor of url::Url to minimize the url dep in payjoin#1377
benalleng wants to merge 10 commits intopayjoin:masterfrom
benalleng:url-rewrite

Conversation

@benalleng
Copy link
Copy Markdown
Collaborator

@benalleng benalleng commented Mar 2, 2026

Relates to #1124

This adds the internal Url Struct to no longer depend on the url crate directly for it.

in addition I also transitioned to the http crate instead of the bhttp/http dep as that also depends on url internally.

However we still have reqwest inside payjoin url from payjoin-directory and test-utils which pull in the url dep, but that is only available on the io feature.

I have also added a fuzz target, which already helped me better shape the parse function better.

I have only ran the fuzzer for a limited amount of time however and some more cpu hours might be helpful

Claude really helped me get through the brunt of this.

Pull Request Checklist

Please confirm the following before requesting review:

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Mar 2, 2026

Pull Request Test Coverage Report for Build 23653146850

Details

  • 391 of 431 (90.72%) changed or added relevant lines in 15 files are covered.
  • 6 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.2%) to 84.3%

Changes Missing Coverage Covered Lines Changed/Added Lines %
payjoin-cli/src/app/v1.rs 1 2 50.0%
payjoin-cli/src/app/v2/ohttp.rs 5 6 83.33%
payjoin/src/core/ohttp.rs 2 3 66.67%
payjoin-cli/src/app/config.rs 4 6 66.67%
payjoin/src/core/io.rs 1 3 33.33%
payjoin/src/core/url.rs 363 396 91.67%
Files with Coverage Reduction New Missed Lines %
payjoin-cli/src/app/v1.rs 1 69.04%
payjoin/src/core/into_url.rs 5 84.44%
Totals Coverage Status
Change from base Build 23607944477: 0.2%
Covered Lines: 11002
Relevant Lines: 13051

💛 - Coveralls

@benalleng benalleng changed the title Url rewrite Remove url dep from payjoin crate* Mar 2, 2026
@benalleng benalleng changed the title Remove url dep from payjoin crate* Remove url dep from payjoin crate Mar 2, 2026
@benalleng benalleng changed the title Remove url dep from payjoin crate Use internal Url struct in favor of url::Url to minimize the url dep in payjoin Mar 2, 2026
@benalleng benalleng marked this pull request as draft March 2, 2026 23:31
@benalleng

This comment was marked as resolved.

@benalleng benalleng marked this pull request as ready for review March 27, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants