Specification
The websockets domain in Polykey can be extracted out in order to be re-used inside PKE.
Initial usage will just wrap around ws. So no runtimeless support yet. We would later extract the functionality of ws to have runtimeless support.
Proper runtimeless support would need to support TLS too. This is also where we can investigate how to unify the TLS between all the IO libraries. It's possible that the entire state machine can be done in pure JS without involving Rust/C++, it might be fast enough. Doing this would a be separate thing.
Additional context
Tasks
- Extract out
src/websockets to js-ws
- Implement the
WebSocketStream muxing/demuxing on top of WebSocket connection
- Ensure that library works in browser and also on nodejs.
- Plan out the roadmap to support runtimeless operation (without
ws)
- Plan out the roadmap for unified TLS support - assuming runtimeless state machine is pure JS, then TLS operations would have to be exposed via JS routines too (this is necessary to support WSS)
Specification
The websockets domain in Polykey can be extracted out in order to be re-used inside PKE.
Initial usage will just wrap around
ws. So no runtimeless support yet. We would later extract the functionality ofwsto have runtimeless support.Proper runtimeless support would need to support TLS too. This is also where we can investigate how to unify the TLS between all the IO libraries. It's possible that the entire state machine can be done in pure JS without involving Rust/C++, it might be fast enough. Doing this would a be separate thing.
Additional context
Tasks
src/websocketsto js-wsWebSocketStreammuxing/demuxing on top ofWebSocketconnectionws)