studio icon indicating copy to clipboard operation
studio copied to clipboard

Switch to comlink instead of our home grown web worker rpc

Open amacneil opened this issue 4 years ago • 3 comments

via @defunctzombie:

https://github.com/GoogleChromeLabs/comlink#typescript

Supports better type information for the receiver. And one less thing to maintain with strange edge cases.

amacneil avatar Apr 27 '21 23:04 amacneil

@defunctzombie I imported this but don't know what it is referring to. should we close it or do you want to flesh out the description?

amacneil avatar Jul 07 '21 17:07 amacneil

We have https://github.com/foxglove/studio/blob/main/packages/studio-base/src/util/Rpc.ts which we use to communicate with workers. Comlink does a lot of the same things and claims to have TypeScript support so we should explore using it to replace our custom implementation.

jtbandes avatar Jul 07 '21 18:07 jtbandes

Oh ok, for web workers. I thought this was related to the electron RPC or something.

amacneil avatar Jul 07 '21 18:07 amacneil