Skip to main content
engineeringtoolsbuilding-in-public

Why I Build My Desktop Apps Native First

By Nathan "n8" Watkins5 min read

For the small tools I leave running all day, what an app costs to leave running matters more than how fast it was to write. Here are my measured numbers, native against webview, and what native cost me.

#desktop-apps#native#rust#slint#tauri#webview#memory
On this page
8x less memory: a tray system monitor uses 12 MB built native in Rust and 100 MB as a webview.

For the small tools I leave running all day, what an app costs to leave running matters more than how fast it was to write. So on Windows I build them native first, in Rust with Slint. On Mac and Linux I am staying with Tauri for now.

These are tray apps. They sit in the corner of the screen for hours and are almost never what I am actually working on. Three of them are open source:

Pulse, my native system monitor, on my PC during a busy afternoon.

What pushed me to write these numbers up was Claude's new install-as-app artifacts, which I covered in ⁠Claude Artifacts Aren't Going to Kill the App Store (opens in a new tab). One of Anthropic's demos is a tray system monitor, the same kind of app as Pulse. I have not measured a Claude artifact app cleanly yet, so there is no number for one here.

How I measured

I measured private working set, the number Task Manager shows in its Memory column. Everything ran on my own Windows 11 PC, often with other programs open, not on a lab machine. Treat every number as "about".

Where I could, I measured the same app built two ways: native, and as a webview. Pulse's webview build is a parked prototype. Traybay's and Scribe's are the apps people install today.

Pulse's Top apps list switching between memory and processor, on sample data.

The numbers

Memory use of the same apps built native in Rust and as a webview.
  • Pulse, native: about 7 MB hidden in the tray, about 12 MB with the panel open, and about 0.3% of one core while hidden.
  • Pulse, webview prototype: about 28 MB hidden at best, about 100 MB open.
  • Traybay, native: about 5 MB with its window open.
  • Traybay, webview: opening its window adds about 66 MB in browser processes, on top of the tray itself.
  • Scribe, webview today: about 167 MB idle once its window has been opened, and still about 185 MB three and a half minutes after closing it.

Of Scribe's 167 MB, about 111 MB is the browser engine and about 42 MB is the speech engine. Scribe's own process is about 3 MB.

Scribe's native version is not finished, so it has no number yet. I will add one when the port ships and I can measure it the same way.

Where the memory goes

A webview app draws its screens with a hidden copy of a browser engine, WebView2 on Windows. That engine runs in extra processes and holds memory whether or not you are looking at the window. A native app draws its screens itself, with no browser inside.

In fairness to webviews, Windows trims the memory of a hidden one, so the closed number is not bad. Traybay's webview build sat at about 5 MB with its window closed. The gap shows when the window opens and the engine wakes up.

Trimming has limits, though. Once Scribe's window has been opened, closing it gives almost nothing back for minutes. Only after a long time hidden does Windows bring it back toward 43 MB.

Native is not automatically light either. With Slint's GPU renderer, Pulse measured about 108 MB. The software renderer, which draws without the graphics card driver, is what keeps it low.

When a webview is still the right call

Tauri is a fine choice for a lot of apps. It is what I use on Mac and Linux, and I am keeping it there, because writing a native layer for every platform is not worth the time.

The case for native is strongest for apps that stay running all day. For a window you open, use and close, a few minutes of extra browser memory may not matter, and one set of screens for every platform is a real saving.

What native cost me

Going native is not free. Before converting Scribe, I built a throwaway trial in Slint first. Its verdict was "go, with conditions". These are the costs I know about:

  • Two sets of screens per app. The plan is that Mac and Linux get core fixes right away, but new window features later, in batches.
  • Close, not identical. The native look is indistinguishable at a glance, but text smoothing differs and there is no backdrop blur.
  • Gaps in the toolkit. Chinese text can show empty boxes without a font for that language, right-to-left text needs a workaround, and screen readers and input methods still need hands-on checks.
  • A license notice. Slint's royalty-free desktop license requires an "About Slint" notice in the app. Pulse shows it at the bottom of Settings.
Pulse's settings, switching between light and dark.

I got it wrong twice

Measuring my own apps corrected me in both directions.

First, in the webview's favor. Before measuring, I expected a hidden webview to blow past a 60 MB budget. It did not, because Windows trims it. That is why I now quote the open window.

Second, in native's favor. I first reported Pulse at about 1 MB hidden. That came from a run on sample readings and caught the low point right after the panel hides. Measured with the real reader, it is about 7 MB. The gap with the webview still holds.

How to decide for your own app

  • Ask how long it stays running. If it starts with the computer and sits in the tray, its memory is a cost every minute of the day. That favors native.
  • Measure the open window. Windows trims hidden webviews, so the closed number flatters them.
  • Say which number you quote. Task Manager's Memory column is private working set. Other counters, like commit, read higher for both kinds of app.
  • Check the renderer. A native app on a GPU renderer can cost as much as a webview.
  • Count the screens you can maintain. If you ship on several platforms and cannot keep two sets, a webview is a fair trade.
A tray app should cost less than the tab you are reading this in.

Sources

Share this note

Share on X (opens in a new tab)

Newsletter

Liked this? Get the next one by email

One short email in any week with a new post. Nothing else, and one click to unsubscribe.

You’ll get a link to confirm first. Privacy

n8

@n8watkins

using AI to making things I wish existed

308 Following105 Followers

Comments

More notes