Allow a Runtime to have no raw TCP sockets (for wasm)

IIUC, in browser environments, you can't open raw TCP sockets from wasm; instead you have to use WebSockets or such.

That's not a complete showstopper: we could still use WebSockets for alternative transports, and then make those mandatory for wasm environments. But to do that, we'd need a few infrastructure changes:

  • We'd need Runtime to be able to exist without TCP support: either by being more cautious about when we require TcpProvider in other crates, or by letting the TcpProvider implementation return some kind of NotImplemented error. The first alternative has complexity drawbacks; the second has a correctness issue.
  • We'll need a websocket-only implementation of snowflake or something that can get used when we don't have raw TCP.

This ticket is probably pretty far down the road.

Edited Feb 15, 2022 by Nick Mathewson
Assignee Loading
Time tracking Loading