Live data from Hacker News

Show HN: I rewrote my Mac Electron app in Rust

desktopdocs.com

301–310 of 465 posts

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

#301
post #297

Beware the greenfield effect. I don’t want to comment on the technology choices specifically here, but in general the whole “we rewrote our app in X and now it’s better” is essentially a fact of life no matter the tech choices, at least for the first big rewrite. First, you’re going to make better technical choices overall. You know much better where the problems lie. Second, you’re rarely going to want to port over…

Microsoft rewriting typescript tools in Go and getting a 10x speedup? It's wild that they would choose Go for that. And a surprising level of speedup. https://devblogs.microsoft.com/typescript/typescript-native-...

My surprise is typescipt is so slow. I have never used it yet, but I think will never too.

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

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

This looks fantastic! Any deets on the stack?

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

#304
post #297

Beware the greenfield effect. I don’t want to comment on the technology choices specifically here, but in general the whole “we rewrote our app in X and now it’s better” is essentially a fact of life no matter the tech choices, at least for the first big rewrite. First, you’re going to make better technical choices overall. You know much better where the problems lie. Second, you’re rarely going to want to port over…

Microsoft rewriting typescript tools in Go and getting a 10x speedup? It's wild that they would choose Go for that. And a surprising level of speedup. https://devblogs.microsoft.com/typescript/typescript-native-...

In my experience, Go is one of the best LLM targets due to simplicity of the language (no complex reasoning in the type system or borrow checker), a high quality, unified, and language-integrated dependency ecosystem[1] for which source is available, and vast training data.

[1]: Specifically, Go community was trained for the longest time not to make backward-incompatible API updates so that helps quite a bit in consistency of dependencies across time.

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

#305
post #303

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…

This looks fantastic! Any deets on the stack?

The UI inside the webview is written in Angular, everything else in C#.

More on the stack and our initial issues can be read here: https://kreya.app/blog/how-we-built-kreya/#cross-platform-gu... (from 2021)

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

#306
post #168

Earlier quoted context omitted.

I guess the Web would be all much better if ChromeOS Platform was everything that remained, who needs standards and multiple vendors.

It's much more convient for developers for there to be a dominant to open source browser engine. Open source reduced the need for these standards and multiple vendors. See what happened with how Linux largely replaced the slew of UNIXes. The ability for everyone to contribute to a single project paired with the ability to customize it where needed to suit the product you are building has shown to be a winning model.

Ask BSD guys and girls how they feel about that.

Monocultures are great, as long they are the one we bet on.

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

#307
post #297

Beware the greenfield effect. I don’t want to comment on the technology choices specifically here, but in general the whole “we rewrote our app in X and now it’s better” is essentially a fact of life no matter the tech choices, at least for the first big rewrite. First, you’re going to make better technical choices overall. You know much better where the problems lie. Second, you’re rarely going to want to port over…

Microsoft rewriting typescript tools in Go and getting a 10x speedup? It's wild that they would choose Go for that. And a surprising level of speedup. https://devblogs.microsoft.com/typescript/typescript-native-...

A tooling team selects language widely used in tooling circles - wild, shocking.

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

#308
post #304

Earlier quoted context omitted.

Microsoft rewriting typescript tools in Go and getting a 10x speedup? It's wild that they would choose Go for that. And a surprising level of speedup. https://devblogs.microsoft.com/typescript/typescript-native-...

In my experience, Go is one of the best LLM targets due to simplicity of the language (no complex reasoning in the type system or borrow checker), a high quality, unified, and language-integrated dependency ecosystem[1] for which source is available, and vast training data. [1]: Specifically, Go community was trained for the longest time not to make backward-incompatible API updates so that helps quite a bit in consi…

AFAIK the borrow checker is not strictly needed to compile Rust. I think one of the GCC Rust projects started with only a compiler and deferred adding borrow checking later.

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

#309
post #58

Earlier quoted context omitted.

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

I know. I'm saying that Tauri doesn't make things more difficult than any normal web app development, it's not like making web apps which work across browsers is a new and scary thing

This is true in a "technically correct" way, but not in a meaningful way.

It's like developing sophisticated websites for IE6-era web, with ActiveX and Java applets and this new "ajax" thing on the horizon that sure sounds nice but it'll be a decade before you can actually use it for most of your users.

The very core basics are essentially the same because yea - it's just a web browser. An will be bigger than a

. But they are regularly multiple years out of date, have WILDLY different security and native-access models, version specific bugs, initialization and threading requirements, performance tradeoffs, styling quirks, and you might have hundreds or thousands of versions to test against which you cannot reasonably test against because they are frequently tied to specific operating system versions that you can no longer download and install, or require hardware you do not have.

So yea. IE6-era stuff. Not an exaggeration at all.

For simple stuff they work just fine, performance is generally more than good enough, and they start up faster, use fewer resources, and lead to a much smaller install. They're entirely reasonable choices. But once you push the edges of the envelope they're an absolute nightmare, and that is the entire reason Electron exists. That is what caused Electron to become the giga-powerhouse that it is now. It solved that problem, at relatively high cost, but it is incredibly obviously worth it to anyone who has dealt with native webviews in complicated ways.

Modern browsers are a completely different game, in comparison - far more consistent and up to date in aggregate. They're utterly incomparable.

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

#310
I have built something similar but only for photos - https://viroop.com. It is free for now. You have to run this command on the extracted app for MacOS to not show you the dreaded "App is damaged" dialog - `xattr -d com.apple.quarantine Viroop.app`.

My app is built with tauri too. It supports all kinds of images - - JPEG - PNG - TIFF - WEBP - BMP - ICO - GIF - AVIF - HEIC/HEIF and RAW images from various camera manufacturers.

The image reading and processing (for exporting images) is all done on the rust side. These are the crates i use - image - libheif-rs -> to read HEIF/HEIC images - rawler -> to read JPEGs embedded inside RAW images - libraw -> to convert RAW images to JPEGs and PNGs - rexiv2 -> to read image exif data

I use the candle crate to download the CLIP model and generate index pairs for images. I store the faiss indexes in a file on the file system.

I am using the app personally for about a month and it feels amazing to use something you have built yourself.

I hope to add an image editor to the app in the future so that I have my own app management and editing software which is enough for my ametuer needs.

Any kind of feedback would be most welcome.

Post reply on HN