Lurker News
A year ago, my co-founder launched Desktop Docs here on HN. It's a Mac app we built with Electron that uses CLIP embeddings to search photos and videos locally with natural language. We got positive feedback from HN and our first paying customers, but the app was almost 1GB and clunky to use.

TLDR; rebuilding in Rust was the right move.
So we rewrote the app with Rust and Tauri and here are the results:
- App size is 83% smaller: 1GB → 172MB - DMG Installer is 70% smaller: 232MB → 69.5MB - Indexing files is faster: A 38-minute video now indexes in ~3 minutes instead of 10-14 minutes - Overall more stability (old app used to randomly crash)
The original version worked, but it didn't perform well when you tried indexing thousands of images or large videos. We lost a lot of time struggling to optimize Electron’s main-renderer process communication and ended up with a complex worker system to process large batches of media files.
For months we wrestled with indecision about continuing to optimize the Electron app vs. starting a full rebuild in Swift or Rust. The main thing holding us back was that we hadn’t coded in Swift in almost 10 years and we didn’t know Rust very well.
What finally broke us was when users complained the app crashed their video calls just running in background. I guess that’s what happens when you ship an app with Chromium that takes up 200mb before any application code.
Today the app still uses CLIP for embeddings and Redis for vector storage and search, except Rust now handles the image and video processing pipeline and all the file I/O to let users browse their entire machine, not just indexed files.
For the UI, we decided to rebuild it from scratch instead of porting over the old UI. This turned out well because it resulted in a cleaner, simpler UI after living with the complexity of the old version.
The trickiest part of the migration was learning Rust. LLMs definitely help, but the Rust/Tauri community just isn’t as mature compared to Electron. Bundling Redis into the app was a permissioning nightmare, but I think our solution with Rust handles this better than what we had with Electron.
All in, the rebuild took about two months and still needs some more work to be at total parity with its Electron version, but the core functionality of indexing and searching files is way more performant than before and that made it worth the time. Sometimes you gotta throw away working code to build the right thing.
AMA about Rust/Tauri migration, Redis bundling nightmares, how CLIP embeddings work for local semantic search, or why Electron isn't always the answer.

Comments (443) 84 threads

Earlier comments
devwastaken#
You didnt rebuild in Rust. you built a wrapper around a Webview. that webview still uses the same resources as if youd have used webkit directly.

your application is now at the whim of version breaks by the OS browser.

TheMiddleMan2 replies#
Very nice. I've been trying to find an image duplicate detection algorithm/system that suits my use-case for a while. Your app seems promising, however, I'm not willing to pay $99 just to see if it works with my (uniquely challenging) duplicate images.

After realizing there was no demo I was looking for a way to contact you directly with a few sample images, but can't find contact information on the website.
Consider adding a demo and contact info.
Otherwise, the app is looking solid. This seems like a great use of AI.

correa_brian1 reply#
Thanks for the feedback! Will get a demo video and contact info up shortly.

De-duplicating images is on our roadmap. Shoot me your contact info at hello@desktopdocs.com. Would love to see if we can help.

7839284023#
> demo video

I would want to use a demo version (could be with limited functionality) before paying $99 upfront! Not a demo video...

gen2brain1 reply#
The UI appears simple enough to be implemented in any desktop GUI library. Why did you decide on using web technologies? Is it because of the libraries you are using in the app?
katrinarodri#
Yeah, familiarity with the UI component libraries was a big driver in using web technologies for it.
gozzoo2 replies#
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.
correa_brian1 reply#
I've heard good things about Flutter! We briefly considered it but just opted for Tauri out of preference.
brulard1 reply#
You shall hear also about dark side of Flutter. It reimplements the whole UI rendering layer and UI components, so you lose all the flexibility, accessibility etc. of native components. On the other hand with Tauri or React Native you get browser or native OS components.
correa_brian3 replies#
dont like the sound of reimplementing the whole UI components....

Continue this thread — 3 replies

GarettWithOneR1 reply#
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.

kristianp#
> many "advanced" desktop use cases

I've found that the GUI library I tried (fyne with go) was mobile-first, so some desktop things e.g. file-open dialogs didn't have the functionality I expected (the "dialog" was actually drawn within the same window as the application window). Flutter is mobile first too IIUC.
Outside of Qt, languages like rust and go don't have a good solid desktop GUI development option.

Load more comments