Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Browser Extension running inside devtools console as a shell #166840 #16

Open
3 of 8 tasks
Tracked by #166840
lemanschik opened this issue Dec 5, 2022 · 2 comments
Open
3 of 8 tasks
Tracked by #166840

Comments

@lemanschik
Copy link
Contributor

Includes:

Hello i did it successfull already with my own fork and want to contribute back if your interrested.
I did replace the electron stuff with the devtools it self via creating a browser extension that exposes a devtools tab
that can configure additional devtools tabs,sidebars, panels to implement the vscode ui into devtools console it self and use its apis directly

i saw that there is a lot of overhead in bundling it into chrome it was always freezing my pc thats why i did hardfork it to
drop code tha can cause infinity loops and replace it by streams.

as i did so i found out that it is even overhead to run it in a browser tab or external app it made much more sense to drop the overhead and run it directly where the code executes so in devtools including the permission api's and all that to create a nice user experience.

Is any one interrested in that in general ? or do you love electron so much?

to use for example nodejs as a backend we have many interop methods ranging from passing ramdrive fileDescriptors till stdio pipe and so on. also WebRTC you know simple RPC

if this gets attention from the vscode team and or 20 thumbs up i will open a Backporting PR: directly. else i keep it as feature of my editor that then can get used via my code-oss-compat module which offers vsls and vscode and extension compat apis

Features

  • LiveShare Out of the box via devtools remote protocol
  • Instrumentation out of the box
  • browser integration out of the box
  • nodejs integration via browser interOp methods out of the box
  • permission system out of the box
  • virtual filesystem providers and context isolation out of the box.
  • Anything out of the box? ..... can drop over 80% of the vscode code base.
  • Standalone on existing browser: can be launched via devtools remote debug pipe from a ESHost like NodeJS OutOf the Box as App with and without window decoration. via chromium flags and firefox also supports that but has less priority for me as chromium contributor.

Examples

  • fileSystem access api as Workspace Provider
  • chromium workspaces as workspace provider
  • Standalone app launched via nodejs and devtools-remote-protocol in a single window without system menu bar.
  • WebRTC Clustered p2p shared Workspace provider using binary dat Tree of sha512 sums

Online Demos of core tech

It can Run linux builds in a browser on virtual x86 emulated via a wasm module.

@lemanschik
Copy link
Contributor Author

@gulshan it can look exactly 1:1 like the existing vscode but using the existing installed browser.

it also can look like it alreadyy does inside a devtools tab of a existing installed browser.

this drops electron. i am chromium contributor so i know the needed command line switches and integration points to archive that.

i added also of context rendering that means i can render into a empty none decorated window like a widget even transperent support and all that. also click through support. At present i am bundling the NWJS and Electron Projects into API only skelettons.

i am exposing directly the chromium component layer that we did with a Uri schema that allows directly access to native Modules

see: https://github.com/stealify/web-platform
Chromium layer cake 2021

at present i am working under lemanschik/experiments on publishing a browser based whole chromium platform build.

that also supports distributed webrtc build to replace the Google Distributed build system called Goma https://kubala.github.io/docs/setting-up-goma

also did adapters for the most used build system as part of a bigger effort i am working on a chromium build based on v8 that builds it self. droping C++ as dependencie soon. Opens up the space for the next larger Project replacing the linux kernel implementation with a skeletton only implementation and running v8 as core on ring 0 how it would be called in linux terms

that enables then to build fuchsia OS based on that.

the name of that is not set at present but it will maybe stay Fuchsia OS

@lemanschik
Copy link
Contributor Author

lemanschik commented Dec 5, 2022

@bpasero it is much more then that that is only a single feature

lets start by the most easy low hanging fruites of that

  • It runs without electron. while showing the exact same interface.
  • Can offer the complet vscode UI using DevTools Api's. So solves the so called Shell
  • the Nativ NodeJS Integration gets archived via CDP Protocol or sharedFileDescriptor both works well. Also remote RPC works well.

In general Chromium Apps are browser extensions and that are lets call it isomorphic they can run standalone like electron does. while they can run in the browser and offer additional tabs in the dev tools console.

This allows to use vscode directly in the devtools console as also connect devtools addons and nativ code bindings to it. Simply wait some more weeks then i got it fully ready then i ping you and you can choose if you want to take it or not. i license everything under no license you can copy paste.

my private overall goal is i want to express everything in streams when it comes to large distributed task and having a code editor to execute them is well also i like the concept of ECMAScript notebooks i for example do a lot of browser extensions that run code directly out of markdown.

Overall the concept is the same as the one your doing your doing at present a rust cli using tokio channels i do the same but i use the chromium IPC and devtools protocol directly. Also nodejs is not a hard requirement only a additional extension

as chromium contains net and file access already.

@alexdima ok will stop contributing will go hard fork have a nice day with your deprecated software i will clean up everything by my self and will remove all issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant