Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug] Can't use alloy-provider/ws on wasm because of transitive dependency tokio-stream on alloy-pubsub #4023

Description

@hukasu

Component

provider, pubsub

What version of Alloy are you on?

alloy-provider v2.0.5

Operating System

Linux

Describe the bug

Including alloy-provider with the ws feature leads to tokio being included with the time feature, crashing a wasm application on building a Runtime

cargo tree -i tokio -e features --target wasm32-unknown-unknown

tokio v1.50.0
└── tokio feature "time"
        └── tokio-stream feature "time"
                └── tokio-stream feature "default"
                        ├── alloy-pubsub v2.0.5
                        │     ├── alloy-provider v2.0.5 (*)
                        │     ├── alloy-rpc-client v2.0.5
                        │     └── alloy-transport-ws v2.0.5
                        └── alloy-rpc-client v2.0.5 (*)
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions