Live data from Hacker News

Show HN: I rewrote my Mac Electron app in Rust

desktopdocs.com

201–210 of 465 posts

Re: Show HN: I rewrote my Mac Electron app in Rust

#202
post #201

Would you be willing to upload a basic template repo of your architecture? I'm very interested in this, and would love to see how you organized your project. Another question - how long did it take for you to rewrite your app?

They note in-post that it took ~2 months

Re: Show HN: I rewrote my Mac Electron app in Rust

#204
post #174

Earlier quoted context omitted.

I am a web developer and haven't used Tauri or Electron much yet. I am wondering why rendering differences between different platforms are such an issue? When building web apps, you face the same challenges, so I would assume it wouldn't be much different.

Web developers building web apps for web browsers typically do not test cross browser compatibility. They build in Chrome and test with Chrome and then the test of the week they whine about Firefox and Safari.

If true then Chrome is truly the new IE because that's exactly what they used to do with IE.

Re: Show HN: I rewrote my Mac Electron app in Rust

#205

I write a lot of small internal tools to enable my team to work more efficiently. I've traditionally used WinForms, but recently tried using WinUI3. Disaster. Not even close to ready. After that, switched to just using React, uploading to an Azure static site, and adding Tauri if someone really wants an executable. Finding what you're finding--Tauri gets you most of the way there and comes with a much smaller file si…

For smaller tools, wouldn't iced-rs be a much better solution? It's much lighter than Tauri, and probably runs anywhere as it's self-contained. Initially, the code might seem daunting, and frustrating due to no hand holding nature, but gets easier.

And last time I worked with it, it seemed much easier than previous versions.

If you have complex UI, then, Tauri is better

Re: Show HN: I rewrote my Mac Electron app in Rust

#208
post #14

I recently went the other way (started a project in Tauri, moved to Electron) because of frustration with rendering differences between the web views employed on different platforms. Have you run into any cross platform UI bugs since you switched? It looks like your UI needs are pretty simple while computation is complex so the extra QA tradeoff would still be worth it for you. I'm just wondering if my experience was…

Just recently Tauri announced: > This year we've got a lot of exciting innovations in store for you, like CEF and SERVO based webviews... From their discord.

Looking forward to either being stable. I like the idea of Tauri, but I need it to work well on Linux too.

Re: Show HN: I rewrote my Mac Electron app in Rust

#209
post #177
post #85

Earlier quoted context omitted.

That's a fair point. My app (and possibly the OP's) is built assuming it is the user's current focus and priority, and that you'll quit it once you're done with the task. I don't feel bad about asking for a chunk of RAM for a focal app like this, but I would feel differently if I was shipping a background tool or small utility or something.

Especially macOS is built on the assumption that you rarely "quit" apps. When you close all of an app's windows, it remains running. You actually have to hit cmd+q or right click and hit "Quit" in the Dock to really quit an app. In other circumstances too though, it's not great UX to demand your users quit your app once they're done with it because it eats too many resources just being idle in the background. It's an…

Electron doesn't seem to support it (and even if it did, I suspect most electron developers wouldn't pay it any mind) but...

NSApplicationDelegate's -(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender; method exists so an application can, uhh, automatically terminate after the last window closes.

https://developer.apple.com/documentation/appkit/nsapplicati...

It's not 100% consistent but if you look at Apple's applications based on single window (calculator, system preferences, etc), closing the window quits the app.

Re: Show HN: I rewrote my Mac Electron app in Rust

#210
post #85

Earlier quoted context omitted.

> Reading anecdata on forums, it seems like the only people who get up in arms over an extra 200MB are HN readers, and my app isn't really targeted at them I think it's good to be wary of overly sensitive advice that regular users don't care about. But would a regular user realize they have 10 electron apps running and their ram is maxed out all the time? The argument against Electron isn't just a single bloated bina…

That's a fair point. My app (and possibly the OP's) is built assuming it is the user's current focus and priority, and that you'll quit it once you're done with the task. I don't feel bad about asking for a chunk of RAM for a focal app like this, but I would feel differently if I was shipping a background tool or small utility or something.

Part of it is respecting your customers regardless of whether they are aware of your crappy electron app consuming all their RAM and draining their battery or not. If I went to a mechanic (car analogy incoming) that repaired pressurized lines with duct tape instead of hose clamps because I wouldn’t care as long as the car worked, I would be upset, regardless of whether or not it got the job done.

Take pride in your work and respect the people using it.

Post reply on HN