From fac497974ceda3cc4c81e16b3d1e1866d757ac26 Mon Sep 17 00:00:00 2001 From: Yash Atreya <44857776+yash-atreya@users.noreply.github.com> Date: Wed, 15 Jan 2025 06:47:26 +0530 Subject: [PATCH] feat(`meta`): add `essentials` to default features (#1904) * feat(`meta`): add `full` to default features * feat: essentials * fix: add `js` to getrandom for wasm32 * Revert "fix: add `js` to getrandom for wasm32" This reverts commit bec14d9fd8b70d7451fef8c7b346811f6df96b39. * fix: exclude alloy from wasm32 workflow * nit --- .github/workflows/ci.yml | 1 + crates/alloy/Cargo.toml | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5aa79b9a62..872481ef234 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,6 +90,7 @@ jobs: - name: cargo hack run: | cargo hack build --workspace --ignore-unknown-features --features ws --target wasm32-unknown-unknown \ + --exclude alloy \ --exclude alloy-contract \ --exclude alloy-network \ --exclude alloy-node-bindings \ diff --git a/crates/alloy/Cargo.toml b/crates/alloy/Cargo.toml index fac399789e1..534cee430c3 100644 --- a/crates/alloy/Cargo.toml +++ b/crates/alloy/Cargo.toml @@ -65,7 +65,7 @@ alloy-transport-ws = { workspace = true, optional = true } # ----------------------------------------- Configuration ---------------------------------------- # [features] -default = ["std", "reqwest", "alloy-core/default"] +default = ["std", "reqwest", "alloy-core/default", "essentials"] # std std = [ @@ -76,19 +76,19 @@ std = [ "alloy-consensus?/std", ] +# essential features that enable basic network interactions out of the box. +essentials = ["contract", "provider-http", "rpc-types", "signer-local"] + # full full = [ "consensus", - "contract", "eips", + "essentials", "k256", "kzg", "network", - "provider-http", "provider-ws", "provider-ipc", - "rpc-types", - "signer-local", ] # configuration