ipfs / js-ipfs

IPFS implementation in JavaScript
https://js.ipfs.tech
Other
7.44k stars 1.25k forks source link

Support both Yamux and Mplex #4318

Closed lidel closed 1 year ago

lidel commented 1 year ago

As discussed in https://github.com/ipfs/kubo/pull/9641:

js-ipfs doesn't ship with yamux by default, though it can be used via custom config. There should probably be a release with it included, if mplex is being removed from kubo.

@achingbrain Would it be possible to run js-ipfs with both enabled, but prioritize yamux (like on the left side of https://github.com/ipfs/kubo/pull/9641/files), for one release, and then remove mplex and have yamux alone ?

Would below do the trick here?

streamMuxers: [
    yamux(),
    mplex()
  ],

Having it out will allow us to remove MPLEX in the future, and not break js-ipfs deployments, give users graceful migration path.

achingbrain commented 1 year ago

js-IPFS is in the process of being deprecated, the replacement is Helia - please see the State of IPFS in JS post for a bit of background and the migration guide for how to port your app over.

Helia ships with both yamux and mplex so interested users should upgrade as soon as possible.