Tauri for building OSes is fine?

I heard of a bond-wm window manager for Linux that uses Electron, but no clue whether it's efficient or not. The developer said it's best for desktops with ample resources.

What about Tauri for a full Linux desktop environment (webkit2gtk)?

p.s. sorry for asking nearly the same, but i've not got a solid answer yet.

e.g. Tauri for a desktop env.? - #2 by jofas this talks just about webkit2gtk being used for "apps", not WM/DEs

No, it's not a good idea.

You will be entirely dependent on capabilities and performance of GTK's webkit, and for most things you won't even have direct control over it, only through a JavaScript bridge.

I wouldn't be surprised if the browser engine had dependencies on the window manager, which would create circular dependencies when you tried to make a window manager with it.

1 Like

hmm, so I'm indeed better off investing in GTK 4 perhaps :confused: Although I'd not say it's so much very flexible in terms of graphical manipulation of UI elements (neither is HTML5 as is).

tbh i'm lost

ig i give up in os dev then :stuck_out_tongue:

To be clear, in this scenario you're not developing an OS; you're developing a desktop environment for the existing OS called Linux. A desktop environment (DE) consists of a number of things, but the two primary elements are the window manager (WM) and a set of applications.

The window manager is what... well, manages the windows. It's what actually displays the content that each window is trying to display. It decides which windows to show, where to put them, when to tell them to redraw; it gathers input (from keyboards, mice, etc.) and passes it to the correct window; it displays titlebars, handles closing windows; and much more behind the scenes. Usually a WM is built on top of either X11 or Wayland (on Wayland, it's called a "compositor" instead). This is a hard undertaking, and one for which Tauri is not only a bad choice, but not even a choice at all: it simply doesn't do anything that a WM does. Tauri creates a window to be displayed by a WM: naturally, it cannot then be a WM itself.

The other part, the application set, is a more straightforward (albeit still huge) task to make. This consists of a file manager, settings application, Bluetooth manager, network manager, media player, and anything else you want to bundle with your DE. Often this includes backend services (such as an xdg-portal plugin). Other details usually include a unified theme across the various GTK and QT versions. For making the applications themselves (like the file manager), you could definitely use Tauri.

To summarize: you most certainly cannot make a WM in Tauri, and you probably didn't intend to make a WM anyways. If you decided to base your DE on an existing WM (such as Openbox or KWin), you could decide to build your application set using Tauri. However, keep in mind that web-based applications tend to be rather heavy; if you make all your applications in Tauri, it will probably consume a large amount of system resources to run multiple at once.

2 Likes