rust-web3 icon indicating copy to clipboard operation
rust-web3 copied to clipboard

Add wasm support to transports::Either

Open platonfloria opened this issue 2 years ago • 1 comments

Issue: 'the trait web3::Transport is not implemented for `web3::transports::Either' when used in wasm.

Reason: wasm Futures do not implement Send, that is required for Transport implementation of Either. See https://github.com/rustwasm/wasm-bindgen/issues/2833

Solution: Remove Send requirement for wasm implementation by using LocalBoxFuture.

platonfloria avatar Aug 07 '23 11:08 platonfloria

Can you elaborate why the transport does not work in wasm currently? I have to admit I don't fully understand neither the problem nor the solution, so would appreciate some insights in the PR description.

Done

platonfloria avatar Jun 15 '24 10:06 platonfloria