Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make hyper and tokio optional dependencies #269

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CircuitCoder
Copy link

This pull request adds two default features runtime-tokio and connector-hyper, which control if the default runtime / connector implementation is present.

This change makes it possible to use this crate in environments where Tokio and/or hyper cannot be used, and the end user wants to provide their own Connector implementation (e.g. Cloudflare Worker (worker-rs, Fetch), Phala Network (sidevm, see #266)).

Notably, Api::send_timeout currently depends on Tokio, so we have to disable that if runtime-tokio is not selected. In those cases, we are forced to use Api::send without timeouts in UpdatesStream. This may be suboptimal, but should yield correct behavior nevertheless.

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