automerge / automerge-repo-rs

MIT License
39 stars 6 forks source link

Js interop #26

Closed alexjg closed 1 year ago

alexjg commented 1 year ago

This PR does two things (in the two commits):

  1. Move tokio specific functionality behind a feature flag. This is achieved by making the stream handling abstract via a RepoHandle::connect_stream method
  2. Add some interoperability tests which spin up the JS automerge-repo server and check we can sync with it via websockets using tungstenite
teohhanhui commented 1 year ago

Having one tokio feature flag for everything forces tokio-tungstenite to be pulled in even when it's not being used...

alexjg commented 1 year ago

True, this seems like it would be the desired case for many people as interop with web peers is one of the goals here. I agree we shouldn't bundle them into one feature flag though. Fancy putting in a PR which introduces a tokio-slimline feature flag which only includes tokio?