Live data from Hacker News

Show HN: I rewrote my Mac Electron app in Rust

desktopdocs.com

41–50 of 465 posts

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

#42
post #17
post #3

How do you run CLIP in Rust? I'm still not sure what the best inference stack on Rust is --- I tried onnxruntime bindings in Rust a few years ago and it was rather finicky to work with.

> I'm still not sure what the best inference stack on Rust is I was just looking into this today! The options I've found, but yet to evaluate: - TorchScript + tch = Use `torch.jit.trace` to create a traced model, load with tch/rust-tokenizers - rust-bert + tch = Seems to provide slightly higher-level usage, also use traced model - ONNX Runtime - Convert (via transformers.onnx) .pt model to .onnx encoder and decoder,…

There's also the burn framework but there are a lot of tradeoffs to consider. It's neat for wgpu targets (including web) but you'll need to implement a lot of stuff.

Candle is a great choice overall (and there are plenty of examples) but performance is slightly worse compared to tch.

Personally, if I can get it done with candle that's what I do. It's also pretty neat for serverless.

If I can't, I check if I can convert it to onnx without extra work (or if there is an onnx available).

As a last resort, I think about shipping torchlib via tch.

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

#44
post #39
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…

Dealing with the rendering differences isn't any more difficult with Tauri than it is when making a normal web app, is it?

No, WebkitGTK is notoriously an issue.

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

#45
post #39
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…

Dealing with the rendering differences isn't any more difficult with Tauri than it is when making a normal web app, is it?

With Electron, it will bundle chrome into the app so you only have to handle that single rendering engine. Tauri uses whatever is the default browser on the system the app is installed on

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

#46
post #39
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…

Dealing with the rendering differences isn't any more difficult with Tauri than it is when making a normal web app, is it?

Chrome has by far the most consistent cross-platform rendering.

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

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

I worked with an open-source project that uses Tauri 1.x and their migration has been blocked with issues for months. It was a nightmare for the span I was involved in, and it looks like it hasn't moved forward since I stopped.

In particular, rendering and crashing issues specific to Linux have been blockers, but Tauri 1.x also has other rendering issues on Linux that 2.0 fixed. There's little to no guidance on what's causing the stability and new rendering problems or how to fix them.

The app I worked on was a launcher that installed and managed content for an app, and the launcher invoked the app through command-line flags. Those flags arbitrarily fail to be passed in Tauri 1.x but work as expected in Tauri 2.x, but nobody we asked about it knows why.

Post reply on HN