r/solidjs • u/killerkidbo95 • Aug 25 '26
I made a Solid renderer for native desktop windows (no webview) — thoughts?
Hey 👋
So I've been building **solid-gpui** — it lets you render Solid 2 components into real native desktop windows using Zed's GPUI (the editor's UI framework, Metal on macOS). No webview, no Electron.
Repo: https://github.com/heyhuynhgiabuu/solid-gpui
The cool part: it's a real `@solidjs/universal` renderer. So Solid stays Solid — your signals just work, updates are fine-grained, nothing weird. Your JS runs a reactive graph that drives a native tree through a tiny JSON pipe to a Rust helper.
A few choices I made (happy to argue about any of them):
- The Rust side runs as a **separate process**, talking NDJSON over stdio. No Zed fork, no node native modules, same code path on every OS. Simple.
- The wire protocol exists in TS and Rust, and both test suites parse the **same JSON fixtures** — so the two sides can't silently drift apart.
- Zero runtime deps in the protocol/client packages.
- Clean-room build, nothing copied from anywhere.
What actually works right now:
- Mount a tree, fine-grained updates (text/style/tree changes), ~1ms builds
- Click, mouse, focus, keyboard events (tabIndex, modifiers)
- Text input + textarea with **working IME** — marked text, caret survives emoji, Enter submits
- Virtualized list: 500 items, only ~60 painted. Has a `followTail` mode for chat UIs
- Animations: slap `transitionMs` on an element, style changes animate. Interpolated on the Rust side, retargets mid-flight without jumping macOS works today. Windows/Linux should work without big changes (stock upstream GPUI) but I haven't tried.
Honest gaps: you author with hyperscript `h()` for now (JSX plugin is next), styles are a subset, one window.
One gotcha that cost me a day, saving you the same day:
[solidjs/solid#2569](https://github.com/solidjs/solid/issues/2569) — solid-js@2 resolves to SSR stubs under the default `node` condition, so your app just silently stops being reactive. Run everything with `--conditions=browser`.
Questions for you:
- Would you use this? What's missing?
- Is `h()` a dealbreaker, or is the JSX plugin the thing to do first?
- Multi-window, IPC, packaging — what do you need first for real desktop apps?
- Anyone with GPUI experience on Windows/Linux want to help test?
15
u/LXMNSYC Aug 25 '26
https://github.com/lxsmnsyc/solid-gpui
guess we're both on to something
7
u/belst Aug 25 '26
that's like the 3rd or 4th ai generated solid-js in rust project I've seen in the last 2 days alone. what is happening
3
u/Cnyster Aug 25 '26
How does it perform? memory consumption etc compared to wekview based implementation?
2
u/gihrig-P86 Aug 27 '26
I have a Solid/Rust based SaaS project maybe 6mo away that needs a native client.
I will definitely explore it. (starred on gh)
Don't like h(), would much prefer jsx. Might not be a deal breaker if otherwise a good fit.
Multi-window not a big deal as long as pop up/drop down menus are available. Full Tailwind/ts DX is important.
I presume packaging is just
bun build --compile --target=<target> ./path/to/your/app.ts --outfile myappIf not then what?2
u/_SunDoge_ Aug 25 '26
I made a similar thing, but with vello 😂 https://github.com/SunDoge/wabou