andreamancuso / xframes

GPU-accelerated GUI development for Node.js and the browser
https://xframes.dev
MIT License
5 stars 0 forks source link
dear-imgui fabric glfw nodejs opengl react wasm webgpu

XFrames - cross-platform DOM-free GUI development for Node.js and the browser

xframes is a high-performance library that empowers developers to build native desktop applications using familiar web technologies, specifically Node.js and React, without the overhead of the DOM. xframes serves as a streamlined alternative to Electron, designed for developers looking to maximize performance and efficiency.

Key Features

Getting started

At the moment the easiest way to get started is to run

npx create-xframes-node-app

Enter a name for your project then wait until source files and dependencies are installed, then

cd <project-name>
npm start

You should see the following:

alt text

Why Choose xframes?

While Electron and similar frameworks are powerful, they bring with them the weight of the DOM and CSS, often limiting performance for certain types of applications. xframes was designed to avoid these limitations by offering a DOM-free, lightweight solution optimized for performance-critical applications.

xframes lets you:

Core Technologies

xframes combines several technologies to deliver high-performance desktop applications:

Roadmap

xframes is actively maintained with planned features and enhancements. The focus at the moment is to add support for more Dear Imgui widgets.

Supported platforms - Node-API v9

Architecture OS Notes
wasm32-emscripten N/A Works in browsers that support WebGPU rendering
x64-windows Windows 11 Home Works
x64-linux WSL2 (Ubuntu) 24.04.1 LTS Works by setting export GALLIUM_DRIVER=d3d12
x64-linux Debian Trixie Works
x64-linux Ubuntu 24.04 LTS Works

Accessibility

Accessibility is a key priority for the future of xframes. While the current version lacks comprehensive accessibility support, we are committed to making xframes an inclusive framework that provides equitable access for all users. Upcoming development will focus on implementing accessibility features and adhering to industry standards, ensuring xframes applications can be used effectively by people with disabilities. Our goal is to create a robust, accessible platform that enables developers to build applications for diverse audiences with confidence.

Basic online demo

(online demo) Only browsers that natively support WebGPU: Chrome, Edge, Firefox nightly, possibly Safari (though I have not tested it).

Screenshots

React Dear Imgui screenshot 1

React Dear Imgui screenshot 2

React Dear Imgui screenshot 3

React Dear Imgui screenshot 4

Building

Supported platforms

Architecture OS Compiler Notes
wasm32-emscripten N/A emsdk 3.1.64 Works in browsers that support WebGPU rendering
x64-windows Windows 11 Home Visual Studio 2022 Works
x64-linux WSL2 Ubuntu 24.04.1 LTS gcc 13.2.0 Works by setting export GALLIUM_DRIVER=d3d12
x64-linux Debian Trixie gcc 14 Works
x64-linux Ubuntu 24.04 LTS gcc 13.2 Works

Contributing

We welcome contributions! If you’re interested in helping develop xframes, please get in touch and I'll help you get started.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

genautz
genautz

💻 📖 📦 🔧 🚇
Radliński Ignacy
Radliński Ignacy

📓

This project follows the all-contributors specification. Contributions of any kind welcome!