Skip to content

Commit

Permalink
feat(alloy): add "full" feature flag (alloy-rs#877)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
zerosnacks authored and ben186 committed Jul 27, 2024
1 parent 9d680eb commit d34b9c2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
21 changes: 18 additions & 3 deletions crates/alloy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@ std = [
"alloy-consensus?/std",
]

# full
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`
]

# configuration
reqwest = [
"dep:reqwest",
Expand Down Expand Up @@ -116,8 +131,8 @@ pubsub = [
rpc = []
json-rpc = ["rpc", "dep:alloy-json-rpc"]
rpc-client = ["rpc", "dep:alloy-rpc-client"]
rpc-client-ws = ["rpc", "alloy-rpc-client?/ws"]
rpc-client-ipc = ["rpc", "alloy-rpc-client?/ipc"]
rpc-client-ws = ["rpc-client", "alloy-rpc-client?/ws"]
rpc-client-ipc = ["rpc-client", "alloy-rpc-client?/ipc"]
rpc-types = ["rpc", "dep:alloy-rpc-types", "alloy-rpc-types?/eth"]
rpc-types-anvil = ["rpc-types", "alloy-rpc-types?/anvil"]
rpc-types-beacon = ["rpc-types", "alloy-rpc-types?/beacon"]
Expand Down Expand Up @@ -165,7 +180,7 @@ postgres = ["alloy-core/postgres"]
getrandom = ["alloy-core/getrandom"]
rand = ["alloy-core/rand"]
rlp = ["alloy-core/rlp"]
serde = ["alloy-core/serde", "alloy-eips?/serde", "alloy-serde"]
serde = ["alloy-core/serde", "alloy-eips?/serde", "dep:alloy-serde"]
ssz = ["alloy-core/ssz", "alloy-rpc-types?/ssz"]
arbitrary = [
"alloy-core/arbitrary",
Expand Down
6 changes: 6 additions & 0 deletions crates/provider/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,9 @@ pub mod utils;

#[doc(no_inline)]
pub use alloy_network::{self as network, Network};

#[cfg(feature = "ws")]
pub use alloy_rpc_client::WsConnect;

#[cfg(feature = "ipc")]
pub use alloy_rpc_client::IpcConnect;

0 comments on commit d34b9c2

Please sign in to comment.