libp2p / go-ws-transport

a websocket implementation of a go-libp2p transport
Other
60 stars 19 forks source link

remove wasm support #114

Closed marten-seemann closed 2 years ago

Stebalien commented 2 years ago

Unless there's a real motivation, I'd just keep it until it becomes a maintenance burden.

That and, as @vyzo says, we need to check to see if someone is using it.

marten-seemann commented 2 years ago

Unless there's a real motivation, I'd just keep it until it becomes a maintenance burden.

It already is. I'm trying to move #72 forward, and it's creating tons of merge conflicts, some of them related to wasm support. Not saying that those conflicts couldn't be resolved, but it would definitely easier if we didn't have to deal with it in the first place. Adding listener support for wss will also cause more special-casing.

Stebalien commented 2 years ago

That's more a matter of "less code has fewer conflicts" than anything. Have you tried applying those changes manually? They look pretty simple.

But really, the question is:

  1. Does anyone currently need wasm support in libp2p (cc @albrow)?
  2. is there a "reasonable" replacement? While rust would be ideal, I'm not sure how complete/secure the rust gossipsub implementation is, for example.

At the end of the day, it's up to you. Unfortunately, we don't have enough capacity to actually finish wasm support.

albrow commented 2 years ago

@Stebalien thanks for checking! I am no longer working at 0x but I can try to provide some additional context. When I was working there (about 2 years ago now), Wasm support was a critical component of https://github.com/0xProject/0x-mesh which was being used in production by a handful of fairly popular decentralized apps. At the time, Rust was not an option due to two main factors: (1) The libp2p2 implementation was missing a few key features and (2) Some important cryptography libraries in Rust were not Wasm-compatible. (However we did acknowledge that Rust might be a better alternative long-term once these roadblocks were addressed).

I'm not sure what the current state of things is. It looks like 0x Mesh has been marked as deprecated. Maybe @opaolini would know more?

marten-seemann commented 2 years ago

Unless there's a real motivation, I'd just keep it until it becomes a maintenance burden.

That is the motivation for this PR: Removing unused code so we can move this repo forward (WSS dialing and listening support).

chux0519 commented 2 years ago

We are currently using this repo for wasm support(version 0.5).

I think a solution would be to keep the current wasm support, but new features will not be ported to wasm side.

Maybe some maintenance and development work could leave to community.