Gluon

A new framework for creating desktop apps from websites, using system insta...

README

Gluon

License: MIT
NPM version
GitHub Sponsors
Discord
Gluon is a new framework for creating desktop apps from websites, using system installed browsers (not webviews) and NodeJS, differing a lot from other existing active projects - opening up innovation and allowing some major advantages. Instead of other similar frameworks bundling a browser like Chromium or using webviews (like Edge Webview2 on Windows), Gluon just uses system installed browsers like Chrome, Edge, Firefox, etc. Gluon supports Chromium and Firefox based browsers as the frontend, while Gluon's backend uses NodeJS to be versatile and easy to develop (also allowing easy learning from other popular frameworks like Electron by using the same-ish stack).

Features

- Uses normal system installed browsers - allows user choice by *supporting most Chromium and Firefox based browsers,  no webviews
- Tiny bundle sizes - <1MB using system Node, <10MB when bundling it
- *Chromium and Firefox supported as browser engine*, unlike any other active framework
- Minimal and easy to use - Gluon has a simple yet powerful API to make apps with a Node backend
- Also supports Deno (experimental) - Deno is also being worked as an option (developer choice) in replacement of NodeJS for the backend, [check out the deno branch](https://github.com/gluon-framework/gluon/tree/deno)
- Fast build times - Gluon has build times under 1 second on most machines for small projects
- Actively developed and listening to feedback - new updates are coming around weekly, quickly adding unplanned requested features if liked by the community (like Firefox support!)
- Cross-platform - Gluon works on Windows, Linux, and macOS (WIP)
Gluworld Screenshot showing Chrome Canary and Firefox Nightly being used at once.

Trying Gluon

2. Inside of gluworld, run npm install
3. Now do node . to run it!
Shell example
  1. ```sh
  2. $ git clone https://github.com/gluon-framework/examples.git
  3. $ cd examples
  4. $ cd gluworld
  5. $ npm install
  6. ...
  7. $ node .
  8. ```

Status

Gluon is currently barely a month old, so is still in an early and experimental state. But it works and shows (in my opinion) potential! I am open to opinions, suggestions, feedback, ideas, etc. Currently you cannot easily test it yourself. If you're interested and want to talk to me and others about Gluon, you can join our Discord server.

Specific feature statuses

FeatureStatus
-------:----:
UsingStable
UsingExperimental
Web-NodeStable
IdleExperimental
UsingExperimental

Ecosystem

- Gluon: the Gluon framework (NodeJS)
- Glugun: builds Gluon apps into releasable builds with optional bundling (soon)

Apps

- Gluworld: Hello World demo app with version info shown
- Gludoom: Doom running as WASM, made into a native looking app with Gluon
- Glucord: minimal desktop Discord client loading official webapp (demo/example)

IPC API

Gluon has an easy to use, but powerful asynchronous IPC API. Example:
  1. ```js
  2. // In your website's JS
  3. const reply = await Gluon.ipc.send('my type', { more: 'data' });
  4. console.log(reply); // { give: 'back', different: 'stuff' }
  5. ```
  1. ```js
  2. // In your Node backend
  3. import * as Gluon from '@gluon-framework/gluon';
  4. const Window = await Gluon.open(...);
  5. Window.ipc.on('my type', data => { // { more: 'data' }
  6.   return { give: 'back', different: 'stuff' };
  7. });
  8. ```

Comparisons

Internals

PartGluonElectronTauriNeutralinojs
----------------------------------
FrontendSystemSelf-containedSystemSystem
BackendSystemSelf-containedNativeNative
IPCWindowPreloadWindowWindow
StatusEarlyProductionUsableUsable
EcosystemIntegratedDistributedIntegratedIntegrated

Benchmark / Stats

Basic (plain HTML) Hello World demo, measured on up to date Windows 10, on my machine (your experience will probably differ). Used latest stable versions of all frameworks as of 9th Dec 2022. (You shouldn't actually use random stats in benchmarks to compare frameworks, this is more so you know what Gluon is like compared to other similar projects.)
StatGluonElectronTauriNeutralinojs
----------------------------------
Build<1MB[^system][^gluon][^1]~220MB~1.8MB[^system]~2.6MB[^system]
Memory~80MB[^gluon]~100MB~90MB~90MB
Backend[^2]~13MB[^gluon]~22MB~3MB~3MB
Build~0.7s[^3]~20s[^4]~120s[^5]~2s[^3][^6]
Extra info: All HTML/CSS/JS is unminified (including Gluon). Built in release configuration. All binaries were left as compiled with common size optimizations enabled for that language, no stripping/packing done.
[^system]: Does not include system installed components.
[^gluon]: Using Chrome as system browser. Early/WIP data, may change in future.
[^1]: How is Gluon so small? Since NodeJS is expected as a system installed component, it is "just" bundled and minified Node code.
[^2]: Backend like non-Web (not Chromium/WebView2/etc).
[^3]: Includes Node.JS spinup time.
[^4]: Built for win32 zip (not Squirrel) as a fairer comparison.
[^5]: Cold build (includes deps compiling) in release mode.
[^6]: Using neu build -r.