Skip to content

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

Draft
benalleng wants to merge 8 commits intopayjoin:masterfrom
benalleng:url-rewrite
Draft

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

Conversation

@benalleng
Copy link
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.

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
Collaborator

coveralls commented Mar 2, 2026

Pull Request Test Coverage Report for Build 22596246534

Details

  • 314 of 376 (83.51%) changed or added relevant lines in 15 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.03%) to 82.512%

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 286 341 83.87%
Files with Coverage Reduction New Missed Lines %
payjoin-cli/src/app/v1.rs 1 69.04%
Totals Coverage Status
Change from base Build 22579575348: 0.03%
Covered Lines: 10913
Relevant Lines: 13226

💛 - 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
Copy link
Collaborator Author

Drafting for mutants

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