HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Ikryanov

no profile record

Submissions

Show HN: An open source tool for generating macOS app icons with AI

github.com
1 points·by Ikryanov·2 เดือนที่ผ่านมา·0 comments

[untitled]

1 points·by Ikryanov·2 เดือนที่ผ่านมา·0 comments

Source code protection in JavaScript desktop apps

teamdev.com
1 points·by Ikryanov·3 เดือนที่ผ่านมา·0 comments

Show HN: MōBrowser, a TypeScript-first desktop app framework with typed IPC

teamdev.com
7 points·by Ikryanov·3 เดือนที่ผ่านมา·0 comments

What's wrong with Electron IPC and how it could be improved

teamdev.com
4 points·by Ikryanov·3 เดือนที่ผ่านมา·1 comments

comments

Ikryanov
·17 วันที่ผ่านมา·discuss
ClipBook
Ikryanov
·3 เดือนที่ผ่านมา·discuss
[dead]
Ikryanov
·3 เดือนที่ผ่านมา·discuss
[dead]
Ikryanov
·3 เดือนที่ผ่านมา·discuss
I've been working with Electron for a while, and one thing that keeps bothering me is how IPC is designed. I mean, it's pretty good if you write a simple "Hello, world!" app, but when you write something more complex with hundreds of IPC calls, it becomes... a real pain.

The problems I bumped into:

1. No single source of truth for the API between renderer and main.

2. Channel names are just strings (easy to break, hard to refactor).

3. No real type safety across process boundaries.

4. I have to manually keep main, preload, and renderer in sync.

5. The errors I can see only at runtime.

I tried to think about a better approach. Something on top of a contract-based model with a single source of truth and code generation.

I wrote my thoughts about how the current design can be improved/fixed (with code examples) here:

https://teamdev.com/mobrowser/blog/what-is-wrong-with-electr...

How do you deal with this in your project?

Do you just live with it or maybe you built something better on top of existing Electron IPC implementation?
Ikryanov
·5 เดือนที่ผ่านมา·discuss
The uncompressed macOS app bundle size for Electrobun's `react-tailwind-vite.app` is ~63MB.
Ikryanov
·5 เดือนที่ผ่านมา·discuss
The business logic of your app is running in the Main process using Bun runtime. The website you load or the app's frontend is running in a separate sandboxed Renderer process. When I run Electrobun app on macOS, I see that it launches the following processes with the following RAM usage:

- views://mainview (33.7MB) <- your frontend is running here

- react-tailwind-vite-dev Networking (5.4MB)

- react-tail wind-vite-dev Graphics and Media (16.7MB)

- react-tailwind-vite-dev (60.7MB)
Ikryanov
·5 เดือนที่ผ่านมา·discuss
A regular Electron app for macOS (DMG) is ~80MB. Electrobun's DMG is ~16MB.
Ikryanov
·5 เดือนที่ผ่านมา·discuss
A Tauri app built on CEF (Chromium) is very similar to Electron (which also uses Chromium). The key difference is that Tauri uses Rust for the application’s business logic, whereas Electron uses JavaScript.

In this case I don't know why I should use Tauri instead of Electron.