Something went wrong. Try again.
Node.js & Bun bindings for Zed’s GPUI. Build memory efficient native apps with React or Solid.js
Something went wrong. Try again.
Files
- Rust 51%
- TypeScript 47%
- JavaScript 2%
- HTML <1%
- CSS <1%
README.md
# GPUIX
**React and Solid** for [GPUI](https://github.com/zed-industries/zed/tree/main/crates/gpui), Zed's GPU UI framework.
Write a React or Solid tree in TypeScript. GPUIX paints it with Metal, DirectX, or Vulkan. No Electron. No web view.
`useState` and JSX still apply. Layout, text, and input go through GPUI, not the DOM.

Everything above is GPUIX: the glass window, the cards, the schedule,
and native text.
## Quickstart
Create an app from the official example. The command downloads only
`example-app/` and installs its dependencies. There is no repository clone,
native build, or Rust toolchain.
```bash
bunx @gpuix/cli new my-app
cd my-app
bun run dev
```
`@gpuix/react` pulls the native renderer for your platform. Edit `app.tsx` and
the running window remounts on save. Click and keyboard handlers switch to the
new tree without recreating the window.
Using Solid 1 instead? Start with the [Solid quick start](#solid-quick-start).
### Build from scratch
Install the packages directly when you do not want the example app:
```bash
bun add --exact @gpuix/react @gpuix/native react
bun add -d @types/react typescript
```
**Pin your adapter and `@gpuix/native` to the same exact version.** GPUIX is
still pre-1.0, so a new release can break either package. The adapter pulls
`@gpuix/native` with a version range, and that range can install a newer native
binary under an older adapter. Add both as direct dependencies. Upgrade them
together.
### 1. Point TypeScript at the GPUIX JSX types
**`jsxImportSource` is required.** Without it TypeScript uses DOM types, so
`<virtual-list>`, `<markdown>`, `<code>` and `style.hover` all fail to
typecheck.
```json
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"jsx": "react-jsx",
"jsxImportSource": "@gpuix/react",
"strict": true,
"skipLibCheck": true,
"noEmit": true
}
}
```
### 2. Write the entry file
End the file with `rend…