Skip to content

Enable usage in sans-io / non-async projects. - #33

Open
KrausMatthias wants to merge 2 commits into
junkurihara:mainfrom
KrausMatthias:feature/sync
Open

KrausMatthias wants to merge 2 commits into
junkurihara:mainfrom
KrausMatthias:feature/sync

Conversation

@KrausMatthias

Copy link
Copy Markdown

Currently the sync APIs use block_on and require the futures/executor. This limits the usage in sans-io / non-async projects:

  • unexpected panics when a sans-io library building on httpsig-hyper is used in an async project.
  • futures/executor dependency

I suggest to swap Sync And Async APIs and avoid the futures/executor dependency. This resolves the panics and simplifies the API by reducing the number of necessary constraints on the traits.

Changes are intentionally kept minimal. The order of the trait implementations was changed so that differences between the original async implementation and the new sync implementation become visible.

Please let me know if you have any concerns or require any changes.

Matthias Kraus added 2 commits October 27, 2026 21:09
and retaining async compatibility.

Drop trait constraints on Body as the traits do not depend on the
Request/Response Body type.
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.

1 participant