Live data from Hacker News

Show HN: I rewrote my Mac Electron app in Rust

desktopdocs.com

61–70 of 465 posts

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

#61

Tauri isn't really fully cross-platform in the same way as Electron due to the issues with webkit-gtk, etc. though.

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

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

#62
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…

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.

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 rendering in whatever the default web view browser is. On Mac this will be some version of Safari (depending on MacOS version), and on Windows it will be some recent-ish Edge thing. Tauri actually has a nice page breaking this down: https://v2.tauri.app/reference/webview-versions/

This also means that a new OS release can change how your app is rendering, so a user can conceivably have a UI bug appear without updating your app.

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

#63

Earlier quoted context omitted.

As a rust developer, I do too! Those are not representative of rust GUI/3D etc desktop applications. I've made some pretty complicated stuff with 2D and 3D graphics, lots of functionality; expected size is 5-15Mb on Windows, and 10-25Mb on Linux. Less if you don't need 3D.

What do you think would be more in line with what you've seen in the past? There's definitely room to keep optimizing.

<25Mb for the executable. For the use case the web page desribes, probably <15Mb. It usually comes down to dependencies used.

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

#64

Why Mac specifically? Context: I do a lot of GUI application work in rust, and have never had to make a program OS-specific. There are quirks with CUDA, and CPU architecture if using SIMD, but they can be feature-gated out, or detected at runtime.

Desktop Docs needs a GPU to work well, so we started with the Silicon chip Macs since they are ideal candidates to handle the workload of indexing an entire media library.

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

#65
Better do a Google reverse image search before you put fake testimonials on your website:

Alex Chen is also known as „Alexander Hipp“ or „Felix Mueller“

Though the concept is interesting - I don‘t like bullshit marketing like „Trusted by Professionals worldwide“ if I can uncover the real deal within seconds

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

#66
post #24

please write more about how you embedded redis in either electron or rust. this is good work & massive. nicely done

thanks for checking it out.

I'd love to write more about bundling redis binaries into these apps soon. There isn't a lot written about it now (at least that I could find) and it was a lot of trial and error to get it working.

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

#67
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…

We actually haven't rolled out cross platform support yet with the Tauri version, so we will see how that goes. Our UI needs are simple, luckily. What kind of rendering differences were you seeing with Tauri? Was there one platform that worked the best/worst for your app? We'd love to support Windows next. With the Electron version of the app, we had issues running our bundled binaries on Macs with Intel chip. That c…

Nothing flat out broke, but I am developing and dogfooding on a Mac, so I get visual QA for free on that platform. When I tested my app on a Windows machine, I noticed several UI regressions that looked/felt really janky. I didn't get as far as testing a Linux build, but I assume I'd find more issues there.

I can't remember why I wanted to migrate to 2.0 now, but there was a nice-to-have that I couldn't do in 1.4. I ended up abandoning the 2.0 migration after a slew of cryptic errors, took a step back, and decided I'd be better off using Electron for my project. My app is at heart a rich UI text editor and none of the computation is that expensive. With all the value add coming from the interface, optimizing for consistency there feels right.

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

#68

> Redis for vector storage ... Redis bundling nightmares Im super curious why you picked Redis over something more typical (SQLite springs to mind) What was the advantage of doing this that made it worth the pain?

I did some prototyping with SQLite + VSS extension to handle embeddings and wasn't getting the same results as using the Redis search modules. My preference would be to run something that doesn't require a separate for the DB, but it still needs some tuning. Redis gets the job done but there are likely simpler solutions that could give us comparable performance that we'll discover.

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

#69

Earlier quoted context omitted.

We're using the onnxruntime bindgs with the Ort crate. Our biggest challenge was just bundling the onnxruntime into the app and making sure everything was signed, etc.

I heard about burn [1] and candle [2] recently and they sounded interesting. [1] https://crates.io/crates/burn [2] https://github.com/huggingface/candle Interestingly, burn supports candle as a backend.

Nice. I'll try to test these out against our current implementation.
Post reply on HN