←back to thread

323 points CharlesW | 1 comments | | HN request time: 0.212s | source
Show context
zephraph ◴[] No.42210288[source]
This is awesome! I built a similar tool as an experiment while at Recurse: https://github.com/zephraph/webview. Didn’t really do any heavy lifting though, just reused some of Tauri’s crates. Does Bun run on the same process as the GUI binding? OSX steals the main thread when rendering a native window which made me lean towards separating the processes. Still wonder if there’s a better way.
replies(1): >>42210696 #
yoav ◴[] No.42210696[source]
I’m using bun for the main process. Bun runs a zig binary which can call objc/c methods. So the “main native application thread” is technically the zig process.

Then there’s all kinds of fancy rpc between bun and zig and between bun and browser contexts.

replies(1): >>42218601 #
1. zephraph ◴[] No.42218601[source]
Ah, cool, that’s essentially what I’m doing too. Rust binary does the system interactions. I’m just using a pretty simple json RPC over stdio though.