# Desktop App should use tauri (native web renderer) instead of electron?

**URL:** <https://forum.kinopio.club/t/desktop-app-should-use-tauri-native-web-renderer-instead-of-electron/1235>\
**Category:** Kinopio Design\
**Created:** [January 11, 2024, 2:39pm UTC](https://forum.kinopio.club/t/desktop-app-should-use-tauri-native-web-renderer-instead-of-electron/1235 "2024-01-11T14:39:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pirijan](https://forum.kinopio.club/user_avatar/forum.kinopio.club/pirijan/32/7_2.png) [@pirijan](https://forum.kinopio.club/u/pirijan)\
**Post date:** [January 11, 2024, 2:39pm UTC](https://forum.kinopio.club/t/desktop-app-should-use-tauri-native-web-renderer-instead-of-electron/1235/1 "2024-01-11T14:39:20Z")

</div>

a longer-term investigation/project

## Context:

The Kinopio desktop apps are provided by the [todesktop.com](http://todesktop.com) service which builds electron apps from a URL for all desktop platforms (windows, linux, mac) and signs them (for mac, windows). Building an electron app yourself is super easy, but building it for other platforms and signing it for distribution (especially on windows) sounds like a nightmare that I’m happy to abstract.

It includes niceties like

- using the page title as the window title,
- opening kinopio urls in the same window and external links in the default browser (much like the iOS app does).
- cmd-t to make tabs in a window, cmd-n to spawn new windows

because the apps are thin wrappers that have no app specific logic, I almost never need to build new versions of the app. I probably build it twice a year – it’s mostly a set it and forget kind of thing.

I think todesktop’s support does a good job. And as a company/service I think it’s pretty good.

## Issue:

The problem is that electron is bloated and inefficient. IRL this isn’t a major problem on my macbook M1, but after playing around with the new macOS safari ‘add to dock’ feature which creates a local (unsigned) native webkit wrapper, I think especially on slower computers the difference is noticeable.

Using activity monitor to look at the quantitative differences reveals some pretty drastic differences (5x - 2x resource usage deltas):

 ![CleanShot 2024-01-11 at 09.25.10@2x](https://forum.kinopio.club/uploads/default/original/2X/d/dc6693a612b30fa7fb45a77b34e6b4c9e141d5fd.png)

The actual app size is 3-5mb on webkit vs 70mb on electron too.

Todesktop has told me that they have no plans to use electron. It also costs 60$/mo (because I’m grandfathered on a cheaper plan).

## Investigation

Can I replace todesktop and provide a better desktop app? i.e. Is there a way to build and sign native desktop builds myself in a way that’s easy to maintain?

The closest I’ve found is Tauri ([https://tauri.app](https://tauri.app)), combined with a special github action ([https://tauri.app/v1/guides/building/cross-platform](https://tauri.app/v1/guides/building/cross-platform)) so that github’s servers build native binaries for all platforms.

## Questions

- are all browser features (eg canvas, localstorage) supported by tauri?
- what’s the cert process like and how much does it costs? ([https://twitter.com/PascalPixel](https://twitter.com/PascalPixel) recently went through this, we could ask him if needed)
- I’ve never used github actions, what are the downsides and cost of using github actions?
- Can i replicate the same basic features of the electron app in tauri? How much control over the window do we get?

If anyone has any experience with Tauri, plz let us know how it was for you~

---

<div class="post-metadata">

**Author:** ![pirijan](https://forum.kinopio.club/user_avatar/forum.kinopio.club/pirijan/32/7_2.png) [@pirijan](https://forum.kinopio.club/u/pirijan)\
**Post date:** [January 11, 2024, 4:08pm UTC](https://forum.kinopio.club/t/desktop-app-should-use-tauri-native-web-renderer-instead-of-electron/1235/2 "2024-01-11T16:08:46Z")

</div>

cc @lucas if you thoughts or experience w this?

---

<div class="post-metadata">

**Author:** ![pirijan](https://forum.kinopio.club/user_avatar/forum.kinopio.club/pirijan/32/7_2.png) [@pirijan](https://forum.kinopio.club/u/pirijan)\
**Post date:** [January 11, 2024, 8:40pm UTC](https://forum.kinopio.club/t/desktop-app-should-use-tauri-native-web-renderer-instead-of-electron/1235/3 "2024-01-11T20:40:48Z")

</div>

A really good looking Tauri app example [https://x.com/gregoryschier/status/1744765170054992044?s=46](https://x.com/gregoryschier/status/1744765170054992044?s=46)

UPDATE: just tried this out and it works really well.  
memory use is about 200mb

cpu and energy use are basically 0 at idle

---

<div class="post-metadata">

**Author:** ![lucas](https://forum.kinopio.club/user_avatar/forum.kinopio.club/lucas/32/1851_2.png) [@lucas](https://forum.kinopio.club/u/lucas)\
**Post date:** [January 12, 2024, 2:29am UTC](https://forum.kinopio.club/t/desktop-app-should-use-tauri-native-web-renderer-instead-of-electron/1235/4 "2024-01-12T02:29:46Z")

</div>

I actually just talked to someone about this, yesterday. Especially the [Tauri Beta](https://beta.tauri.app). Their work looks super interesting.

I don’t have first-hand experience with it, but only heard good things from others.

The person I talked to told me that persistent data like localStorage and IndexDB does not get randomly garbage collected, which would be a plus. I was not able to find that anywhere in the docs, though.  
I would also assume that normal browser features, like canvas, should just work fine, as it’s just using the OSes default browser engine.

In general I think having a universal approach like Tauri for macOS, Windows and Linux does make a lot of sense. It would also give you more control over your apps.

PS: Just want to throw in that a hybrid iOS/macOS version could also be a neat solution for macOS, with widgets and shortcuts.

---

<div class="post-metadata">

**Author:** ![pirijan](https://forum.kinopio.club/user_avatar/forum.kinopio.club/pirijan/32/7_2.png) [@pirijan](https://forum.kinopio.club/u/pirijan)\
**Post date:** [January 12, 2024, 3:05pm UTC](https://forum.kinopio.club/t/desktop-app-should-use-tauri-native-web-renderer-instead-of-electron/1235/5 "2024-01-12T15:05:55Z")

</div>

That sounds promising 🙂 I didn’t know about beta 2.0 but ya sounds like something we should look into. (I also am intrigued by getting android in the future)

> PS: Just want to throw in that a hybrid iOS/macOS version could also be a neat solution for macOS, with widgets and shortcuts.

That’s true, but IMO I think putting the time into Tauri instead of Apple specific platforms is a better use of resources bc it also improves things for windows and linux users which more widely used/helpful than widgets.

---

<div class="post-metadata">

**Author:** ![pirijan](https://forum.kinopio.club/user_avatar/forum.kinopio.club/pirijan/32/7_2.png) [@pirijan](https://forum.kinopio.club/u/pirijan)\
**Post date:** [January 16, 2024, 6:29pm UTC](https://forum.kinopio.club/t/desktop-app-should-use-tauri-native-web-renderer-instead-of-electron/1235/6 "2024-01-16T18:29:55Z")

</div>

@lucas would you be interested in working on this? either before or after the other bug fixes?

---

<div class="post-metadata">

**Author:** ![lucas](https://forum.kinopio.club/user_avatar/forum.kinopio.club/lucas/32/1851_2.png) [@lucas](https://forum.kinopio.club/u/lucas)\
**Post date:** [January 17, 2024, 5:57am UTC](https://forum.kinopio.club/t/desktop-app-should-use-tauri-native-web-renderer-instead-of-electron/1235/7 "2024-01-17T05:57:48Z")

</div>

I am generally interested, but afraid that this will turn into a big project. I don’t have experience with the tech, yet, and don’t have the ability to test on Windows and Linux.

---

<div class="post-metadata">

**Author:** ![pirijan](https://forum.kinopio.club/user_avatar/forum.kinopio.club/pirijan/32/7_2.png) [@pirijan](https://forum.kinopio.club/u/pirijan)\
**Post date:** [January 17, 2024, 2:52pm UTC](https://forum.kinopio.club/t/desktop-app-should-use-tauri-native-web-renderer-instead-of-electron/1235/8 "2024-01-17T14:52:15Z")

</div>

ya that’s fair, this is not critical rn so let’s wait on this

---

<div class="post-metadata">

**Author:** ![easrng](https://forum.kinopio.club/user_avatar/forum.kinopio.club/easrng/32/2064_2.png) [@easrng](https://forum.kinopio.club/u/easrng)\
**Post date:** [June 26, 2024, 9:21pm UTC](https://forum.kinopio.club/t/desktop-app-should-use-tauri-native-web-renderer-instead-of-electron/1235/9 "2024-06-26T21:21:52Z")

</div>

Also worth noting is that Tauri’s HiDPI scaling is completely broken on linux
