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

Move away from electron #118308

Closed
Milo123459 opened this issue Mar 6, 2021 · 57 comments
Closed

Move away from electron #118308

Milo123459 opened this issue Mar 6, 2021 · 57 comments
Assignees

Comments

@Milo123459
Copy link

Milo123459 commented Mar 6, 2021

Hey,

This is not really a feature request, but more of an overall suggestion. I've been interested in something called tauri for a while now, it's basically electron but written in Rust and is extremely lightweight, but not yet stable. It is also a lot more secure.

Moving away from electron and moving to tauri would be a big performance upgrade, allowing for more low-end devices to use VSC.

Obviously, this'd be a lot of work but I think it'd be worth it. I'm pretty sure something inside the vscode package for making extensions would have to change. I'd be happy to help if need be.

This is not urgent at all, but, would be worth it in my opinion.

@pixieaka
Copy link

Sounds good!

Detail Tauri Electron
Installer Size Linux 3.1 MB 52.1 MB
Memory Consumption Linux 180 MB 462 MB
Launch Time Linux 0.39s .80s
Interface Service Provider Varies Chromium
Backend Binding Rust Node.js (ECMAScript)
Underlying Engine C/C++ V8 (C/C++)
FLOSS Yes No
Multithreading Yes Yes
Bytecode Delivery Yes No
Multiple Windows Soon Yes
Auto Updater Soon Yes (1)
Cross Platform Yes Yes
Custom App Icon Yes Yes
Windows Binary Yes Yes
MacOS Binary Yes Yes
Linux Binary Yes Yes
iOS Binary Soon No
Android Binary Soon No
Desktop Tray Soon Yes
Sidecar Binaries Yes No

Notes
Electron has no native auto updater on Linux, but is offered by electron-packager

@Milo123459
Copy link
Author

Yea, it's quite an amazing piece of technology. I'm happy to help out making it!

@Milo123459
Copy link
Author

Oh, tauri is also more secure as it's harder to inject code into applications.

@Milo123459
Copy link
Author

Also, I'm not entirely sure how VScode renders things, like, if it uses a framework like React or something. AFAIK tauri works by using bundled code from a framework, don't quote me on that tho.

@pixieaka
Copy link

@Milo123459
Copy link
Author

I'll check that out when I get home. What is the video on?

@pixieaka
Copy link

pixieaka commented Mar 16, 2021

@Milo123459 The answer for your question from VS Code team. What frontend framework does VS Code use?

@Milo123459
Copy link
Author

Oh 😅
Will checkout later, 👍

@Milo123459
Copy link
Author

Ah, I see, it doesn't use a framework. It just needs to be compiled to html/css/js

@swise0
Copy link

swise0 commented Jul 11, 2021

Front end framework is different.. we are talking about the native run time of the VS code app . Which i think Tauri is a very compatible rust (most loved language of programmers) framework for...

@Milo123459
Copy link
Author

I've done some initial research, and realised it's easier than I thought™. I might be able to create a PR soon.

@swise0
Copy link

swise0 commented Oct 2, 2021

Should you require a frontend framework with huge Performance and low memory overhead, I'd recommend Solidjs on your journey

@Arcitec
Copy link

Arcitec commented Oct 21, 2021

Should you require a frontend framework with huge Performance and low memory overhead, I'd recommend Solidjs on your journey

He's trying to replace the web browser wrapper/executable. Not rewrite the entire HTML GUI, lol.

@Milo123459
Copy link
Author

If rewriting the entire GUI was easier than I thought:tm: then I think someone else would've done that haha. Currently, this is in my personal backlog of things I'm working on, and, is requiring another project I've been working on that can safely (at build-time) convert Electron to Tauri, no config required. It runs tests etc, to ensure it runs the same, but it's pretty massive and taking a while. I'll run this tool on this app when the tool is done.

@Arcitec
Copy link

Arcitec commented Oct 21, 2021

@Milo123459 Wow, that's amazing. I hope it goes well. If it is a big task, perhaps open source it (the converter) now to look for collaborators. I bet many Tauri users or even development team would join you.

@Milo123459
Copy link
Author

Haha, currently 15K LOC into it; it's going pretty well with full interop for all electron APIs. I'll opensource it once it works, and well, I'll test it on VSCode :)

@Arcitec
Copy link

Arcitec commented Oct 21, 2021

Woah. 😳 Thumbs up. 👍

@Milo123459
Copy link
Author

Update: Started working on it with a friend. Decided to double down and add some more technologies into it (Tauri + GPU acceleration). It's coming together, but, taking a while. This project is massive, and well, hope it'll be used!

@quentincaffeino
Copy link

Glad to hear that!

This project is massive, and well, hope it'll be used!

If it would be basically a drop-in replacement or at least support >=50% of main features I'll definitely switch cause I have to run very low-end devicss from time to time.

@Milo123459
Copy link
Author

Drop-in replacement; one command and generates it for you. It runs all the tests to ensure the app runs smoothly and stuff like that.

@NoelJacob
Copy link

@Milo123459 Any progress? I'm intending to try making a fork.

@Milo123459
Copy link
Author

Sadly no

@TheFireCircle
Copy link

I am very curious about the current state too.
Are there any problems?

@Milo123459
Copy link
Author

Well, I haven't been able to work on it all that much. I have covid rn which is a bit of a blocker, along with lots of API changes. In the current state of the project, I can't just make it work. I think the best course of action is just manually migrating the vscode repo to use Tauri.

@Leedehai
Copy link

Leedehai commented May 25, 2022

Tauri uses different browser engines on different platforms, so it'll be Edge/Chromium on Windows, WebKit on macOS, etc.
For a large & complex project like VSCode, I guess issues caused by nuanced inconsistencies across different browser engines are hard to investigate... one more layer to worry about.

@Milo123459
Copy link
Author

Yeah, good point. It'll be like debugging issues on the browser version.

Unfortunately, I have had to move away from working on this (a while ago) due to some important IRL things going on for me. If anyone wants to take a stab at this, feel free.

@NoelJacob
Copy link

Would it be easier to change to nutralino.js instead of Tauri?
https://github.com/Elanis/web-to-desktop-framework-comparison

@arun-cm
Copy link

arun-cm commented Sep 26, 2022

Tauri uses different browser engines on different platforms, so it'll be Edge/Chromium on Windows, WebKit on macOS, etc. For a large & complex project like VSCode, I guess issues caused by nuanced inconsistencies across different browser engines are hard to investigate... one more layer to worry about.

image

@arun-cm
Copy link

arun-cm commented Sep 26, 2022

Now tauri is using https://github.com/tauri-apps/wry - Cross-platform WebView library in Rust

@mrnossiom
Copy link
Contributor

Always has been

@vdvman1
Copy link

vdvman1 commented Sep 27, 2022

The references to the webview used on each platform is talking about what wry ultimately uses under the hood

@Anutrix
Copy link

Anutrix commented Oct 8, 2022

Milo123459 Any updates? Any draft MRs might also be good.

@Milo123459
Copy link
Author

Me and a friend have started working on this again. No ETA, but progress is good.

@plutoniumm
Copy link

Hey @Milo123459 it seems the demand for a Rust VSC is significant, would you consider open sourcing? So maybe the community can join in? The VSC team in an issue before marked it as out of scope so it seems like for now this will have to be a community effort

If its a matter of monetisation then maybe you could try sponsorships on it I'm sure some money would start trickling in very soon

@Milo123459
Copy link
Author

Unfortunately, progress has kinda stopped. I don't think I intend on working on this again, but our approach was reading the .asar, converting all the APIS to tauri compatible APIs and scaffold it into a tauri project that could be built.

@tgross35
Copy link

Publish what you have if you can! Even if it’s very incomplete, you’ve don’t some trial and error that will help others figure it out

@sirus20x6
Copy link

Yes please just release the fork. let people have a stab at finishing it

@AbhijithGanesh
Copy link

AbhijithGanesh commented Dec 7, 2022

Can anyone tell me, where I can find the fork? @Milo123459

@pbarnum
Copy link

pbarnum commented Dec 7, 2022

It doesn't seem like @Milo123459 wants to open source their work, or no longer has the ability to do so. Either way it is unfortunate and someone else will need to start this from scratch.

@Milo123459
Copy link
Author

We never started it other than a few ways of finding out the ASAR file (which is extremely easy) and we were more working on theoretical things. We stopped working on this because we realised this would mean it would be hell to maintain, primarily because of changing APIs all the time. It's not that I don't want to share, it's literally that we have nothing.

@AbhijithGanesh
Copy link

I'd like to start work with this again, I might be an entire newbie to the dev-side of VSCode but I would like to try giving this a shot

@AbhijithGanesh
Copy link

As a first thing, I would like to open a draft PR tagging this issue. I hope this is the process

@Milo123459
Copy link
Author

Also, seeing how you wanted to do it: our work would be completely useless. You're trying to convert VSCode, we're trying to convert all Electron projects.

@AbhijithGanesh
Copy link

I am inclined to agree, my worries/concern were specifically over VSCode. I would like to make that a separate issue then. That will add more clarity

@AbhijithGanesh
Copy link

@lramos15 I think this issue deals with electron only, @Milo123459 has mentioned it. Please open the closed issue

@Milo123459
Copy link
Author

No, you've opened a duplicate issue. My project was more advanced but you can use this as an issue for replacing electron in vscode.

@AbhijithGanesh
Copy link

Thanks @Milo123459 I will use this issue as a reference then.

@deepak1556 deepak1556 self-assigned this Dec 20, 2022
@deepak1556
Copy link
Contributor

Hi all, thanks for your interest in exploring an alternative runtime for VSCode desktop. Although Tauri has its advantages over Electron, it is not yet the right alternative for VSCode based on our current desktop integration with the Chromium and Nodejs runtime, you can learn more about our process architecture and some of the customizations made to the runtime for our not too recent Sandbox effort at https://code.visualstudio.com/blogs/2022/11/28/vscode-sandbox. We are following alternative desktop framework projects like Tauri, Flutter, Webview2 etc., but we are not at the point of considering a runtime migration. Please follow our roadmap https://github.com/Microsoft/vscode/wiki/Roadmap for these major updates.

@deepak1556 deepak1556 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 21, 2022
@Milo123459
Copy link
Author

I think this issue should be left open as a tracking issue. This is not just about Tauri, this is just simply about moving away from Electron.

@deepak1556
Copy link
Contributor

Tracking issue will be created when we start exploring alternatives, currently there is no plan in the upcoming milestones. Closing this issue as part of our issue grooming, refs #167999.

@tiziodcaio
Copy link

I think we should keep it closed, and just in case REOPEN it when the team will consider a change... Meanwhile if there are updates about the possibilities to make a fork/experimental branch using others technologies the issue might be used as thread

@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests