Live data from Hacker News

Show HN: I rewrote my Mac Electron app in Rust

desktopdocs.com

241–250 of 465 posts

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

#241
post #124

Earlier quoted context omitted.

What kind of issues are those? We want to support Windows soon. With Electron we had some cross-platform issues where our bundled binaries wouldn't run reliably in different platforms (even when the binaries were bundled and loaded for those specific platforms).

I have an issue where I have two canvases that are overlapping and only WebKitGTK (not even just WebKit) just randomly stops showing one of the canvases.

Strange. From the comments here sounds like there are a lot of issues with Tauri's UI being inconsistent.

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

#242

Earlier quoted context omitted.

What kind of issues are those? We want to support Windows soon. With Electron we had some cross-platform issues where our bundled binaries wouldn't run reliably in different platforms (even when the binaries were bundled and loaded for those specific platforms).

Just rendering a grey screen on Nvidia - https://www.reddit.com/r/tauri/comments/16tzsi8/tauri_deskto... It's probably okay on Windows though as the backend is different, but that's part of the problem.

I see

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

#243

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.

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

#244
post #77

Isn't such app best implmented with some cross platform framework like flutter? It has support for all major desktop OSes and at leqast the examples run very smooth.

I evaluated Flutter for my app before deciding to go with Tauri and wrote about it on my blog: https://arboretum.space/blog/why-arboretum-chose-tauri .

The short version is that Flutter's lack of rich text editing solutions at the time made it a non-starter. It's a common problem in the Flutter ecosystem from what I've seen, there's often 0 or only 1 quality package for many "advanced" desktop use cases.

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

#245

After this experience, do you think you'll ever build anything in the future with Electron? When do you think Electron is actually the right choice (if at all)?

Now knowing how big Electron is off the bat compared to Tauri, I think I'd have to learn a lot more about how to optimize Electron to build with it again. That said, I think Electron is great for prototyping an idea and quickly getting it out.

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

#246

Looks awesome. I work closely with Multimodal search and have had trouble porting CLIP to ONNX and other formats due to the lack of multi-head attention operators. Are you using Python for the CLIP inference, or did you manage to port it to a format hostable in a Rust or C/C++ inference runtime?

Yes, we were able to port the CLIP model to work with ONNX Runtime for inference

May I ask, which version or ORT are you using? Were the outputs identical to PyTorch outputs for the same image?

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

#247
post #238
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…

> 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.

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

#248

How did you settle on Tauri, as opposed to e.g. egui? Is it because of the experience with Electron? I'm dragging my feet about porting my Python Qt app to Rust, because I feel that no Rust GUI library is as rich as Qt and I know that I'll get stuck with that at some point.

What are your motivations for porting in the first place?

There are two specific places where Python is not performant. I ran some tests in a few languages and Rust and C++ came out on top, by far. I could write Rust components and access them via Python. I could also use C++ and stick with Qt. Or I could take the plunge with Rust. As this is a personal app with no other users, this is a good place to keep sharpening my skills.

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

#249

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.

That's part of it, but also Tauri uses Rust on the backend while Electron uses Node. Electron is way more mature with a larger developer community, but Tauri keeps gaining momentum. If memory safety, bundle size, and performance are important to you, Tauri is a nice choice. Electron is not bad but there's a reason there are so many new players.

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

#250

Earlier quoted context omitted.

That's pretty sick. Nice work. What's it called? We're working on the app store submission this week.

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.

Post reply on HN