Live data from Hacker News

Show HN: I rewrote my Mac Electron app in Rust

desktopdocs.com

271–280 of 465 posts

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

#271
post #267

Earlier quoted context omitted.

> 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. This is our #1 frustration with Tauri. The OS-provided system webviews are not stable, repeatable, consistent platforms to build upon. Tauri decided that a key selling point of their platform was that Tauri builds won't bundle a browse…

Don’t try to speak for me please. I’m perfectly happy with my app looking mildly different and not weighing 1GB. I’m inclined to believe most people using Tauri do not have your issue. I don’t quite understand why you have that issue in the first place. The fact they use the system webview is front, left and center on their website. It’s like you decided to use a fork because of the decorations on the back, and now c…

> I don’t quite understand why you have that issue in the first place.

My read on it is that they didn’t understand the implications of using system webviews.

And possibly they expected Tauri would insulate them from cross-system differences without a lot of exploration.

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

#272
post #238

Earlier quoted context omitted.

> Have you run into any cross platform UI bugs Of course not, it's only for Mac. If they were to support Windows and Linux, they probably would not have published this post. Cross-platform UI is hard , even harder if you want to keep almost the exact same UI, same feature set across platforms, and potentially an online version. People moved from native applications to Qt to web stack for a reason. Saying this as some…

Not sure what you're saying; Tauri uses the native web view, it still ends up rendering a website. The differences in UI toolkits don't matter.

I don't even need to refute the point myself -- plenty of comments under the parent thread have already pointed out problems with Tauri.

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

#273
post #238

Earlier quoted context omitted.

> Have you run into any cross platform UI bugs Of course not, it's only for Mac. If they were to support Windows and Linux, they probably would not have published this post. Cross-platform UI is hard , even harder if you want to keep almost the exact same UI, same feature set across platforms, and potentially an online version. People moved from native applications to Qt to web stack for a reason. Saying this as some…

Not sure what you're saying; Tauri uses the native web view, it still ends up rendering a website. The differences in UI toolkits don't matter.

Just read other replies, if you use the web platform in any capacity, you end up with tons of hardly reproducible issues, and it seems on Linux performance is bad no matter what.

Chromium is superior to the native web view unless you have latest version of Windows or Mac.

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

#274
post #62

Earlier quoted context omitted.

The promise of Electron is the version of chrome you develop on is the version that ships with your app. If it looks right on your machine, it looks right on whoever is running it. This is much nicer than when doing web development and deciding which browsers/browser versions to test and support. Tauri does not bundle chrome with your app. This makes the bundle size much smaller. But the tradeoff is you end up render…

Does anyone actually choose to ship an Electron app instead of a web app in order to benefit from UI consistency? Most Electron apps I've seen either share a codebase with a web app that's also made available (so the codebase still has to be tested cross-browser), or else can't be web apps because they need full filesystem privileges or otherwise don't work with the browser's security model.

Yes, it is the biggest selling point. You almost never need to debug user/platform specific UI bugs -- if the app starts, it will render the same. There might be some GPU issues, but that's not due to the framework itself.

Electron apps often fully share codebase with the Web apps, so on the app backend you implement native functionality and communicate with your app via IPC.

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

#275

I did the same thing with one of my projects. I built a simple webcam viewer that is optimized for USB microscopes as I couldn't find anything out there for this purpose. Basically all of the functionality was implemented in the renderer. As I was planning for App Store submission, I realized that a 500mb webcam viewer might not be the best thing. I decided to port it to Tauri V2 and got it down to about 15mb.

What is the difference between Tauri and Electron. From what I understand both use browser for rendering, except electron ships the whole browser while Tauri use the browser already there on the system.

Exactly. Electron ships with a copy of chromium in every app, while Tauri uses the native WebView of the operating system.

Electron is also way more mature, but Tauri is improving.

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

#276

I did the same thing with one of my projects. I built a simple webcam viewer that is optimized for USB microscopes as I couldn't find anything out there for this purpose. Basically all of the functionality was implemented in the renderer. As I was planning for App Store submission, I realized that a 500mb webcam viewer might not be the best thing. I decided to port it to Tauri V2 and got it down to about 15mb.

What is the difference between Tauri and Electron. From what I understand both use browser for rendering, except electron ships the whole browser while Tauri use the browser already there on the system.

Tauri uses native WebView (can be very outdated in old OS versions) and compiles to native machine code. Electron bundles full Chromium (rendering engine for HTML/CSS+V8 for JS) AND Node.js for your app code.

Honestly if there was an Electron without Node.js which would use literally any compiled language (although Rust is probably too low level), it would've been more tolerable.

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

#277

Earlier quoted context omitted.

I ended up calling it Microscopic View. I made a webpage for it and everything. https://microscopic-view.jgarrettcorbin.com I got tied up with other projects while I was trying to navigate the submission process (it was my first time), so it's not up yet, but I'd be happy send you a build if you want to check it out.

I’d love to see something like this optimized for low end Android - old tablets are almost free and otherwise useless even for web browsing. Also, what is your recommendation for finding a cheap usable microscope? My brief forays to aliexpress have just resulted in frauds and trash.

https://plugable.com/products/usb2-micro-250x/

This is the one I use. It is surprising good for the price. It just behaves as a regular webcam.

I primarily use it for micro soldering, so your mileage may vary, but it is very good for the price. I got it on Amazon where I believe they have an official store.

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

#278

Earlier quoted context omitted.

Haven't touched Tauri because of the cross platform issues. The major appeal with Electron to me is the exact control over the browser. I'm curious about Rust integration though. I'm guessing they're doing something that provides better DX over something like https://github.com/napi-rs/napi-rs ?

> Haven't touched Tauri because of the cross platform issues. You were wise. That's the biggest issue plaguing the project right now. > curious about Rust integration though Tauri is written in 100% native Rust, so you write Rust for the entire application backend. It's like a framework. You write eventing and handlers and whatever other logic you want in Rust and cross-talk to your JavaScript/TypeScript frontend. It…

Sounds easier/more reasonable the other way around. Aren't there already specific libs / bridges for Rust / Electron / Node for performance heavy computations ?

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

#279
post #253

Earlier quoted context omitted.

We are using system webviews for https://kreya.app (not Tauri, but a custom implementation) and the platform differences are seldom a problem... Polyfills fix most of the things and we are running automated end to end test on Linux, which catches most of the issues. IMO the most difficult thing is figuring out how far the users are behind with their webview version, mostly on Linux and macOS. Windows has done thinga…

On the contrary it is a big big issue if you have a complex web app like we do. It was a PITA to deal with user bugs in a specific macos version with a 8y out of date webview. And the performances of webkitgtk are horrible on Linux.

That’s a big issue if you can’t set a minimum required version for some reason, same for web apps in general - I rarely find much problems with platform behavior but that’s probably because we just reject out of date browsers.

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

#280
I love the idea of wha this app is doing, and so many of the options in this space are laggy and painful, so I'm very interested in this rewrite. That said, as a photographer a lot of my media is stored as RAWs, and it's not clear whether that's supported (or perhaps its exclusion from the list of "all major image and video formats" suggests that it's not)?

Does your product have docs/a support forum/other place these kinds of details would be covered?

Post reply on HN