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(alloy): add "full" feature flag #877

Merged
merged 6 commits into from
Jun 12, 2024

Conversation

zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented Jun 12, 2024

Motivation

Closes #876

Solution

  • Makes sure to enable rpc-client when enabling rpc-client-ws so that you do not also need to add the rpc-client flag if you if rpc-client-ws is used. This behavior is in line with the other feature flags.
  • For easy of access make select rpc-client features (WsConnect) and (IpcConnect) directly available (if defined as flag) on the provider. Previously this required separately defining the rpc-client flag and importing it from the rpc::client namespace.

Related PR (see impact of proposed changes): alloy-rs/examples#106

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Comment on lines +76 to +88
full = [
"consensus",
"contract",
"eips",
"k256",
"kzg",
"network",
"provider-http", # includes `providers`
"provider-ws", # includes `providers`
"provider-ipc", # includes `providers`
"rpc-types", # includes `rpc-types-eth`
"signer-wallet", # includes `signers`
]
Copy link
Member Author

Choose a reason for hiding this comment

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

In examples we did not need any specific flags from core as all commonly used functionality is already available by default

@zerosnacks
Copy link
Member Author

Moving to review, open to feedback / suggestions

@zerosnacks zerosnacks marked this pull request as ready for review June 12, 2024 17:16
Copy link
Member

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

Tested it out and I like this as a set of minimal features. I wonder if we could trim KZG, but seems fine for now.

"contract",
"eips",
"k256",
"kzg",
Copy link
Member

Choose a reason for hiding this comment

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

imo this makes sense to include in full

full will probably include more stuff than necessary but for convenience this is okay imo.

@gakonst gakonst merged commit 0e4e29d into main Jun 12, 2024
22 checks passed
@gakonst gakonst deleted the zerosnacks/alloy-metacrate-full-feature-flag branch June 12, 2024 19:38
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
* add initial setup, make sure to enable rpc-client when setting rpc-client-ws flag

* fix `alloy-serde` definition in `serde` flag

* re-export alloy_rpc_client as client in the provider as we enable the rpc flags internally but require the user to import the rpc client for WsConnect / IpcConnect manually

* only selectively enable WsConnect, IpcConnect - make available in root

* add eips and kzg for 4844 tx and access lists

* remove rpc-client from list
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] Add "full" feature flag to alloy meta-crate
3 participants