Deno Desktop
272 points
3 hours ago
| 23 comments
| docs.deno.com
| HN
leleat
1 hour ago
[-]
> Shared CEF runtime across apps. Every app currently bundles its own CEF copy. A managed shared runtime would drop binary sizes to a few MB per app. On the roadmap.

This[0] sounds interesting. I am not familiar with CEF, so I wonder how the versioning works. When different apps require different versions of CEF, do we just essentially end up with the electron model where every app bundles their own browser (just slightly less bad). Or is there still an advantage to a "shared runtime" in that case?

[0]: https://docs.deno.com/runtime/desktop/comparison/

reply
tonyedgecombe
20 minutes ago
[-]
In case anybody else wondered CEF is the Chromium embedded framework.

https://github.com/chromiumembedded/cef

reply
lwansbrough
13 minutes ago
[-]
Web devs are used to their target being evergreen, so I suppose you could opt in or out of that model: "just give me what you got".
reply
lwansbrough
38 minutes ago
[-]
Similar to something I'm working on for games: https://jumpjet.dev

WASM you can bundle for Windows, macOS, Linux, Android, iOS and web. Like Deno Desktop, it doesn't rely on a browser engine.

reply
matharmin
58 seconds ago
[-]
Do you mean "Unlike Deno Desktop"? Deno Desktop definitely relies on a browser engine.
reply
ai_fry_ur_brain
23 minutes ago
[-]
Do you reccomend and resources for building w/ & learning about wasm?
reply
lwansbrough
18 minutes ago
[-]
It's all so bleeding edge right now. It also depends how deep you want to go. An increasing number of languages support wasm as a compile target, which is helpful.

Bytecode Alliance do semi-regular streams on Youtube. I think reading (recent) material on WASI (0.3) and the Component Model would be a good start.

Understanding the relationship between a host and a guest is valuable. Learning what wasmtime is and how it works is also illuminating: https://docs.wasmtime.dev

reply
jorisw
2 hours ago
[-]
> Web technology is the most widely-known UI toolkit in the world.

Poor choice of words there IMHO.

The reason Electron apps get a lot of flak is because they are everything _but_ a UI toolkit. They consistently miss the mark in adopting UI patterns from their host OS.

Web tech is just web tech. Yes it will allow you to render a button, but even unstyled, the button won't necessarily look native to the OS, and will vary between browsers.

reply
Culonavirus
51 minutes ago
[-]
That is not why people use Electron. The goal is not and never was to just be a "UI toolkit" and "adopting UI patterns from their host OS".

Chromium has so much stuff packed into it, its insane. All that utility comes with Electron. And that's a good thing.

If you ever worked with video, for example, you know that having the full power of a modern browser in a desktop app is a game changer. Video playback (not to mention transcoding, which is also possible with modern web and webcodecs) is a complex beast, implementing that yourself is massive undertaking, not to mention in a desktop app that is supposed to work on win/mac/lin. I've built apps with Electron in tens of hours that would otherwise take me tens of days or more (and thats with AI because I'm not a video expert).

reply
conradludgate
2 hours ago
[-]
How is it a poor choice of words? It might not be "native" UI, but they never claimed as such.

I've always felt that native UI on Linux always looks incredibly ugly and I'd much rather use a nicely styled HTML+CSS layout instead.

In my experience, Electron mostly gets flak for being bloated and slow, it not being native is sometimes a secondary point people add on top.

I've always wanted to build a direct-browser integration that could use HTML+CSS for the layout, but avoids needing a JS runtime. Idk how lightweight servo is but one day I hope I will see my idea come to light

reply
noufalibrahim
1 hour ago
[-]
I don't mind the idea of using HTML components and widgets to style desktop applications. CSS and the DOM are widely known and reusing those for desktop apps is probably a good idea.

The problem, as you've pointed out, is that electron apps are bloated and slow. If they became the default and my editor, chat client, terminal, and everything else that I keep open were just thin layers around web applications, I'd rather figure out a way to move things into a browser rather than pull a piece of the browser out to wrap these applications.

reply
wiseowise
47 minutes ago
[-]
There’s a point where it stops scaling in the browser, whether it’s due to scale or poor practices. For example Slack is annoyingly slow to start up and work in my FF, but works OK as an Electron app.
reply
smackeyacky
59 minutes ago
[-]
Looking native has long left the station as an objection about a UI.

Like 25 years ago. Nobody gives a damn since Microsoft stopped giving a damn.

reply
vintermann
42 minutes ago
[-]
I'm not part of the Apple world, but I thought they gave a damn?
reply
jabwd
36 minutes ago
[-]
Nah they stopped caring as well. Developing an application for macOS is hell nowadays. I hate the state of things but both Apple and Microsoft dropped the ball. Linux is even worse, so yeah I don't see a reality out of this unless we actually create something that surpasses the web in all measures.
reply
raincole
7 minutes ago
[-]
> UI patterns from their host OS

I genuinely wonder who ever want that, and what apps those people use on their PC. Can you imagine, for example, Blender Foundation says that their next goal is to make Blender's UI look more like the host OS?

reply
m-schuetz
13 minutes ago
[-]
> They consistently miss the mark in adopting UI patterns from their host OS.

What you suggest is a disadvantage is one of the key advantages of Electron to me. I precisely do not want my things to look different on different OS. I don't have the resources to test my apps on all devices, and knowing that whatever I test on one system looks the same on another is A+.

reply
Abishek_Muthian
2 hours ago
[-]
Every time I use Zed across Linux, macOS and Windows , I'm amazed stable and performant it's GPUI framework is. As a user, I'm very happy with it; of course some basic features like accessibility is missing but I'm sure it will be implemented soon.

As a developer, I'm not sure what's the barrier for entry is apart from Rust then again it's the USP as well.

reply
fny
1 hour ago
[-]
Live reload. GUI development in compiled languages is a pain compared to web development.
reply
eklavya
1 hour ago
[-]
Try dioxus, it has live reload but it's a work in progress.
reply
ga_to
57 minutes ago
[-]
Dioxus seems to be 'just' another way to generate HTML on the desktop. Electron but Rust? Is there a legitimate upside there?
reply
neobrain
28 minutes ago
[-]
With Dioxus, program logic compiles to native code instead of running it through a JS engine, and it ships its own HTML renderer (Blitz) instead of bundling a whole browser. So it's a lot more lightweight and performant than Electron.

As a minor bonus, the live-reload is also faster than what frameworks like React do. It truly has subsecond latency, which isn't exactly a game changer but is nice when iterating on visual details of an app.

reply
LunaSea
43 minutes ago
[-]
Who cares if it looks native?

Native UIs change all the time too and not always for the better.

reply
wiseowise
49 minutes ago
[-]
> Web tech is just web tech. Yes it will allow you to render a button, but even unstyled, the button won't necessarily look native to the OS, and will vary between browsers.

The irritating, and unnecessary, pedantry.

reply
nnevatie
3 minutes ago
[-]
Indeed. Even Qt isn't native, in the most purist sense.
reply
utopiah
2 hours ago
[-]
> look native to the OS

Is that a problem? A button with a legible label is a button. The host OS doesn't have to look exactly like the applications it runs.

reply
jorisw
2 hours ago
[-]
Consistency is a large factor in any good design, UI design more so.
reply
gf000
1 hour ago
[-]
Consistent like what? Like maybe a decade ago one could say that osx was consistent, but nowadays even SwiftUI and cocoa is visibly different, let alone every second app that uses electron. And people don't care.

Windows has like 4 frameworks available on a bare new, latest OS install, just go deep enough in the "settings" or whatever they call it, and you can reach down to winforms. And on top the start menu is a react element!

(And in Linux you have the gtk and the qt world, and everything else)

reply
Gigachad
2 hours ago
[-]
They have internal consistency. The iOS version looks like the macos version which looks like the web version, etc.

This upsets HN users but the rest of the world decided that apps looking like windows built ins doesn't matter.

reply
ahartmetz
1 hour ago
[-]
It's more like developers decided - nobody asked the users.
reply
debazel
1 hour ago
[-]
ironically the only group of users I've found that actually care about native UI, are other developers and Mac purist.
reply
ahartmetz
1 hour ago
[-]
I have seen users having trouble with pixel soup UIs. They may not think "This should be in a native toolkit", but they do think "How the hell do I subscribe to a folder in the new Outlook?".
reply
Gigachad
24 minutes ago
[-]
The problem in these usability cases is pretty much always layout and constant redesigns rather than the exact theme the button has. I've seen plenty of unusable native ui soup UIs and very clean and simple custom UIs.
reply
ahartmetz
7 minutes ago
[-]
You could call it the exact theme when a clickable UI element looks just like regular text (it was not inside any kind of button-like shape in the Outlook case that I saw), but it's super common to have that in web-based UIs.
reply
whizzter
34 minutes ago
[-]
Right, but bad UI's was not uncommon before webviews, if anything the spartan-ness of the web often simpified patterns whilst reliance on weird hotkeys in desktop apps isn't uncommon.
reply
m-schuetz
9 minutes ago
[-]
Consistency is the reason why Electron is great. Consistency of the UI across operating systems.
reply
eterevsky
1 hour ago
[-]
Within OS consistency is much less of thing a thing than Web design conventions. Windows by itself has had several different UI frameworks over the years, so different "native" Windows programs can look completely different from each other.
reply
p-e-w
1 hour ago
[-]
That’s why HN users constantly advocate for Vim, a program in which every single thing works completely differently from every other modern application.
reply
vintermann
38 minutes ago
[-]
Yes, if there's one lesson from historical UI research that still holds, it's that mode switching is expensive. That's why people install vi plugins everywhere.

Wait...

reply
DonHopkins
10 minutes ago
[-]
Since when did anyone ever complain that youtube, google maps, roblox, or any other web sites didn't have native buttons and UI patterns?

Are you implying that the Windows, Mac, and Linux native desktop user interfaces don't all totally suck??! Or that there wasn't a huge celebration when Alan Dye finally left Apple for Meta? Or that users are clamoring for Jony Ive's infamous shallow superficial visual elegance over affordance and discoverability and usability?

Is it just too confusing for people to use youtube because the buttons don't look and feel exactly like native ̉Mac buttons on the Mac and native ̉Windows buttons on the Windows and whatever the kids are using on Linux desktops these days, therefore nobody uses youtube, and that it will only ever get popular if it just had a native look and feel?

reply
pjmlp
2 hours ago
[-]
Yeah, it is mostly laziness and cost cutting at the expense of users.

Nowadays there isn't even an excuse anymore, just vibe code it away in native frameworks.

reply
gf000
1 hour ago
[-]
Which native framework?

Even in a "post-vibe code" era I wouldn't want to create multiple versions of the same app, and none of the "platform-native" GUI toolkits run on everything.

SwiftUI is apple-only, gtk has pretty bad compatibility on non-linux, qt is decent but requires C++ or python, and even so still not much for mobile. Don't even get started on "Windows frameworks", because as I write this sentence they may have left a new one in the ditch.

Flutter may be the closest, but why didn't they go with e.g. Java instead of a new language?

So yeah, if you want a truly universal UI then web is your best bet.

reply
m-schuetz
6 minutes ago
[-]
I have better things to do than spend my time adopting UI for various different systems. If Electron gives me the option to easily create a UI that looks the same everywhere, then that's absolutely fantastic.
reply
kajman
1 hour ago
[-]
I never thought I'd defend Electron, but I'd rather use the bloated web UI than a vibe coded Qt/GTK version I'm positive will not have seen any human QA.
reply
ThatMedicIsASpy
1 hour ago
[-]
When I can modify my desktop/theme (KDE) with css I will happily start doing it since that sounds easy.
reply
Zetaphor
1 hour ago
[-]
reply
wilg
2 hours ago
[-]
None of that changes whether it's a UI toolkit, which it surely is.
reply
sheept
2 hours ago
[-]
I was wondering how this integrates with Deno's permission system, which is one of its biggest strengths especially for letting agents run amok on your device.

The CLI reference page[0] notes,

> The permissions you grant at compile time are baked into the compiled binary:

I think it would be nice if this could be surfaced to the user somehow, like letting the user know and decide which permissions they want to give access to.

[0]: https://docs.deno.com/runtime/reference/cli/desktop/#runtime...

reply
porridgeraisin
2 hours ago
[-]
> What deno desktop doesn't have yet

> Runtime permissions for desktop apps (a permission prompt on every filesystem / network access, i.e. Deno's permission system applied to desktop sandboxing).

reply
bel8
1 hour ago
[-]
I'm happy for competition in this space, specially because Deno can run true TypeScript directly and not just strip types like the current Node implementation.

With that said, this is going to eat a lot of Tauri market. Why would I use Tauri now? The 150mb of additional bundle size is just an extra 1 to 10 seconds of download time in most internet connections and you get a reliable rendering engine.

reply
flohofwoe
1 hour ago
[-]
Deno also just strips the type annotations when running TS code - at least by default. To get type checking you'll need to run via `deno run --check`, or use the separate `deno check` subcommand. No big deal since type checking and linting usually happens automatically in the IDE during development.
reply
bel8
12 minutes ago
[-]
Good to know. Does it also preclude features like enums?
reply
aabhay
54 minutes ago
[-]
Tauri doesn't lock you in to one JS ecosystem. In fact, it doesn't require you to use javascript at all.

Also, we've had several developer framework startups get acquired -- Astro, Nuxt, UV, Bun, Vite. It doesn't exactly inspire confidence in a software that you want to last and give support for years.

reply
swiftcoder
1 hour ago
[-]
> and you get a reliable rendering engine

How is it more reliable than Tauri - aren't they both using the system webview?

reply
bel8
1 hour ago
[-]
Deno Desktop can bundle CEF (Chromium Embedded Framework) according to https://docs.deno.com/runtime/desktop/comparison
reply
fiatpandas
1 hour ago
[-]
Deno desktop can use system web view OR embed CEF. Tauri is just system web view.
reply
aabhay
1 hour ago
[-]
The benefit of Deno Desktop is it's like Tauri except for when you want it to be Electron???
reply
jpace121
1 hour ago
[-]
> Why would I use Tauri now?

You’re “backend” isn’t JavaScript.

reply
solarkraft
2 hours ago
[-]
This is a smart thing to ship. For me it would totally be a consideration when deciding on a platform to use.
reply
sjeno
2 hours ago
[-]
agree, small footprint & cross-platform looks like a nice alternative to electron or tauri..
reply
franz899
2 hours ago
[-]
Their comparison page shows some savings, but not in every case (~40 MB / ~150 MB) https://docs.deno.com/runtime/desktop/comparison/
reply
LauraMedia
12 minutes ago
[-]
Maybe it is because it is still in development, but building and running the Hello World example just gives me a blank terminal and a white window that is not responding.
reply
pippoit
7 minutes ago
[-]
can i open a socket with these tools ? can i open an odbc connection for example ? Or have i need to have a backend ? On desktop usually you can do much more than in the sandbox of a browser . I ask because i don't know these technologies. On windows, even if i don't like it, if the interface and the logic are not too complex, powershell with winform make you create things without "anything" installed and you can easily interact with other windows programs ( office 365 suite, autocad and so on ) so for doing "fast things" in my opinion is a very strong alternative .
reply
krawcu
1 hour ago
[-]
Why did they describe electrobun as macOS only? I checked their docs and it has support for Windows, macOS and Linux

https://docs.deno.com/runtime/desktop/comparison/ https://github.com/blackboardsh/electrobun#platform-support

reply
lillesvin
2 hours ago
[-]
As much as I like cross-platform stuff, I also really like native UIs that follow native UX patterns, etc.
reply
deely3
1 hour ago
[-]
We spend a lot of time using different browsers. As far as I know there no web engine that use native OS UI for rendering.
reply
sureglymop
1 hour ago
[-]
Looks actually good!

I wonder if it supports opening invisible browser windows and doing things like intercepting cookies. In my desktop application I leverage a hidden browser window to manage auth state and use it like a proxy for the rest of the application. Might try to port it to deno desktop.

reply
droidjj
2 hours ago
[-]
> The default WebView backend uses the operating system's own webview for small binaries, and you still have the entire npm ecosystem available through Deno's Node compat layer.

Sounds like a similar architecture to Tauri, but your business logic is in typescript instead of rust.

reply
progx
2 hours ago
[-]
> Opt into the bundled Chromium (CEF) backend when you need identical rendering across macOS, Windows, and Linux.

Sound more like Electrobun

reply
DaanDL
1 hour ago
[-]
I swear we're just going to end up with Java again.
reply
wiseowise
32 minutes ago
[-]
Java would be a killer platform if they shipped built-in, tauri-like, UI.
reply
olcay_
22 minutes ago
[-]
There's Compose Multiplatform if you are willing to switch to Kotlin. Only caveat is that it uses Canvas rendering on web.
reply
clumsysmurf
15 minutes ago
[-]
Compose and AOT compiled binaries would be amazing (GraalVM Native Image kinda thing) but it doesn't look very easy at the moment. Leyden with a regular JVM might be the best we get.
reply
mfru
51 minutes ago
[-]
At this point I think that would be a more sane outcome than whatever it is we have right now.
reply
tonyedgecombe
17 minutes ago
[-]
We were writing and shipping desktop applications with it back in the nineties. Although many of the arguments against it were similar to the arguments against Electron today.
reply
daft_pink
1 hour ago
[-]
Is it going to support iOS/Android?
reply
arikrahman
1 hour ago
[-]
I've decided on using a Clojure/Flutter hybrid that gets the best of all worlds. May integrate move from Bun to using Deno here https://codeberg.org/arik/clutter
reply
utopiah
2 hours ago
[-]
Interesting but IMHO as we see on mobile providing WebViews work. Maybe instead of having Electron, Tauri, Electrobun, now Deno desktop but also plenty of alternatives then desktop browsers should provide WebViews on desktop with sandbox and permissions that make those applications usable. The alternatives listed here would just be fallback for a transition period until the WebViews are "good enough".
reply
pjmlp
1 hour ago
[-]
Webviews have always worked since MSHTML, the issue is being comfy helping Google's market share instead of writing portable Web code.
reply
utopiah
1 hour ago
[-]
That's a whole can of worms, Micro$lop entangling its own browser with its OS, getting a (gentle) slap on the hand for its abuse of monopoly position for it, having to remove it claiming it's "impossible", etc.
reply
andyferris
2 hours ago
[-]
Is it not a web view? With nodejs capabilities from the “backend” half of the app for normal desktop app filesystem access etc?
reply
utopiah
1 hour ago
[-]
If a Web View is not provided by a browser then it's an already installed browser then it's as they say "web rendering engine" that they ship along.

I'm trying to argue that it should already be available via Firefox, Chromium, etc on desktop.

reply
wg0
1 hour ago
[-]
I hope bun desktop is coming soon?
reply
tonyedgecombe
12 minutes ago
[-]
I expect a poorly conceived and buggy vibe coded version will be available this afternoon.
reply
numlock86
1 hour ago
[-]
How does this differ from electrobun, which they explicitly mention, but make no point about? I had a quick drive with deno desktop and don't see how it's better. If anything it's lacking in comparison in my opinion. But hey, we can build desktop apps with deno now, too. So they got that going I guess ...
reply
actionfromafar
1 hour ago
[-]
I think for a little while longer, you can catch bun anything, electro or not, refugeess just by not being bun.
reply
porridgeraisin
1 hour ago
[-]
While I've never liked to use deno compared to node and bun, this looks particularly good. The zero config options are nice, all the features seem to be in the place I like, and I'm happy they're not dogmatic about using the system webview and let you ship your own CEF. The state of system webviews on non-windows platforms is horrendous.
reply
bossyTeacher
1 hour ago
[-]
How is this better than Electron?
reply
IshKebab
1 hour ago
[-]
Vastly easier to set up, optionally lets you use platform web renderers, Typescript by default, you can use the Deno API instead of Node (compatible with less code but much better designed), built-in auto update, you can use Fresh which IMO is the best web framework.
reply
m00dy
1 hour ago
[-]
would be cool to have a comparison with tauri.
reply
tarcon
1 hour ago
[-]
They really did their best comparing it with other tools here https://docs.deno.com/runtime/desktop/comparison/
reply
DiabloD3
1 hour ago
[-]
I don't get the point of this.

The world is trying to make computers faster and more accessible, more web UI slop isn't going to help that. Dumping Javascript entirely is the first step on that road.

reply
vinkelhake
1 hour ago
[-]
I've seen variants of this comment for many years. The alternative to "web UI slop" would presumably be one of the many native toolkits.

I see it in a different way. The fact that "web UI slop" has managed to make great inroads on the desktop is an indictment of the state of native toolkits. If you think it's a problem that desktop apps are being written with web toolkits, the solution for that isn't to shame (as the term "web UI slop" clearly tries to do), but rather to figure out how to improve the native toolkits.

The opportunity to improve those toolkits was always there, and the ball was dropped.

reply
kombine
56 minutes ago
[-]
Yes, native UI toolkits are not perfect, even though I consider Qt very close to one (I'm sure naysayers will find nitpicks). In the end, the choice is between the apps that eat 1GB of your RAM and learning to deal with some idiosyncrasies of native toolkits.
reply
DiabloD3
1 hour ago
[-]
It hasn't made any inroads on the desktop though... all anyone did was just package their own SWA into a self-contained browser that serves its own content. They continue to be websites, with all the pitfalls of them.

I don't need to spend 2GB-4GB of RAM just to have a over-glorified IRC clone!

Also, the native toolkits are fine. Windows has two toolkits, the ShellUI/MFC family (which does everything required, although it doesn't always get hidpi on legacy apps correct; it gets integration for blind people and also unicode/multilingual correct, and also works with touch interfaces), and WinUI does it more modernly (and ticks all the boxes). OSX has its toolkit, seems to nail everything correctly. Linux has Qt (lets ignore GTK for now, only reason you use GTK is if you want to appear Gnome-native), and Qt also does native++ uplifting on other toolkits (ie, native widget + additional feature expansion, plus perfect mimicry of native look for entirely new widgets), plus Qt does everything you need to do correctly and easily.

There are also new UI toolkits coming up through the ranks that are trying to knock Qt off that #1 position. None of the WebUIs would even place in this race.

Web UI toolkits always look non-native, are hard to interpret, often use low contrast (and frankly ugly) colorschemes, are easy to use in ways that do not comply with usability standards across OSes, and usually do nothing for A11Y.

The opportunity to improve those toolkits was always there, and the ball was dropped.

reply
jaimehrubiks
2 hours ago
[-]
This web page stole my scroll liberty
reply