packager icon indicating copy to clipboard operation
packager copied to clipboard

Tauri

Open echoless3484 opened this issue 3 years ago • 3 comments

Hey, Electron isn't really the best thing to use, but a lot of people don't know how to use others so this is one of their only options, might I recommend adding a Tauri or Arc option for compiling in the Packager?

This would be absolutely amazing to see, as it can let you do so much more than Electron, including: Self Updating Self Bundling (Installer) Way better Security Way smaller File Size Easy to manage Plugins

echoless3484 avatar Nov 08 '22 19:11 echoless3484

Tauri will also allow way less memory usage.

echoless3484 avatar Nov 08 '22 20:11 echoless3484

I'm still not entirely convinced that Tauri is ready for production use, but yes this is something to consider working on eventually. The file size benefit is very real and very significant.

Electron does still present some advantages:

  • the project will work more consistently across devices and operating systems
  • it's still easy to modify the resulting files (electron-main.js)
  • on Linux, WebKit (used by Tauri) is just not very good at running Scratch projects

and on macOS we already have a WKWebView option which is similar to what Tauri would do

Self Updating Self Bundling (Installer)

are possible with electron, we just don't do them because they're not easy to do properly, especially in a web app. Tauri won't change that.

Easy to manage Plugins

You probably won't be able to use custom plugins as we ship pre-built binaries

Way better Security

The way we use electron is very secure (nodeIntegration: false, contextIsolation: true, sandbox: true, no IPC at all)

less memory usage

Tauri memory usage isn't going to be as much less than Electron as their benchmarks would imply as the benchmarks run on Linux so they're comparing Chrome vs WebKit memory usage. Most users are on Windows where Tauri uses the same engine as Electron. It'll probably be a less, but probably not by a whole lot (?).

GarboMuffin avatar Nov 08 '22 21:11 GarboMuffin

Another Tauri advantage is that generating a single standalone .EXE may be more viable without very bad performance because the app won't have to unpack all of Chromium each time it starts

GarboMuffin avatar Nov 09 '22 02:11 GarboMuffin