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

feat: improve and complete alloy prelude crate feature flag compatiblity #421

Merged
merged 18 commits into from
Apr 2, 2024

Conversation

zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented Mar 29, 2024

Motivation

Closes #391, has a mirror PR for alloy/examples here: alloy-rs/examples#39

Solution

Fixes:

  • Enables the pubsub feature on alloy-provider when using provider-ws or provider-ipc
  • Exports rpc-client-ws, rpc-client-ipc as feature flags.
  • Added missing native-keccak flag that was not re-exported from alloy/core.
  • Default to std as a default feature but support no_std
  • Add reqwest and hyper as top-level definitions and apply to rpc-client and transport
  • Default to reqwest as default feature
  • Export missing serde feature flag
  • Reorder, clean up and regroup of feature flags

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Comment on lines -131 to -132
transport-http-reqwest = ["dep:reqwest", "alloy-transport-http?/reqwest"]
transport-http-hyper = ["alloy-transport-http?/hyper"]
Copy link
Member Author

@zerosnacks zerosnacks Mar 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaking change, now uses reqwest and hyper top level definitions

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optionally we could mark these as deprecated instead of removing them outright

@zerosnacks zerosnacks marked this pull request as ready for review March 29, 2024 13:37
@zerosnacks zerosnacks changed the title [Feature] Improve and complete alloy prelude crate feature flag compatiblity feat: improve and complete alloy prelude crate feature flag compatiblity Mar 29, 2024
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all of these make sense to me!


# alloy
default-tls = ["reqwest?/default-tls"]
jsonrpsee-types = ["alloy-rpc-types?/jsonrpsee-types", "alloy-rpc-engine-types?/jsonrpsee-types"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaking change, renamed to rpc-types-json


# alloy
default-tls = ["reqwest?/default-tls"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaking change, now part of reqwest flag

@prestwich
Copy link
Member

how will this interact with #379? I'd prefer to merge that one first as it is smaller

@zerosnacks zerosnacks requested a review from Evalir as a code owner April 1, 2024 14:40
@zerosnacks
Copy link
Member Author

how will this interact with #379? I'd prefer to merge that one first as it is smaller

I've pulled in the latest changes, there were no breaking changes.

I've added the alloy-provider reqwest and hyper flag into the top level reqwest and hyper definition.

Copy link
Member

@prestwich prestwich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

crates/alloy/Cargo.toml Outdated Show resolved Hide resolved
@prestwich prestwich merged commit 27d5ba9 into alloy-rs:main Apr 2, 2024
18 checks passed
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.

[Feature] Improve and complete alloy prelude crate feature flag compatiblity
3 participants