chromium-bidi icon indicating copy to clipboard operation
chromium-bidi copied to clipboard

Support both a "standalone" and "embedded" build

Open bwalderman opened this issue 4 years ago • 2 comments

Idea: Support building/running the bidi mapper in two configurations:

  • "embedded" - This is the current configuration. Mapper is injected into a browser tab and communicates with the rest of the browser through exposeDevToolsProtocol.
  • "standalone" - New config. Mapper runs as a node module outside the browser and communicates with the browser through remote-debugging-port/pipe.

Motivation:

Standalone mode would simplify development and testing of mapper code. The bidi server code and mapper code would all run in the same node process which simplifies debugging.

bwalderman avatar Jul 13 '21 07:07 bwalderman

This sounds reasonable if it doesn't come with any complications to support both contexts. Can the same API that exposeDevToolsProtocol exposes be used in the "standalone" config as well, so that extra code for achieving the same API in both is only needed when running as a node module? That would minimize binary size cost in the hoped-for final configuration of being bundled with the browser.

foolip avatar Jul 13 '21 11:07 foolip

Unlocked by https://github.com/GoogleChromeLabs/chromium-bidi/commit/0d2b05c871d76607b678621ae0b43ebde1bd99e8

sadym-chromium avatar Dec 02 '22 13:12 sadym-chromium