Home

Awesome

<h1 align="center"> <sub><img src="assets/logo.png" height="38" width="38"></sub> Gluon </h1> <span align="center">

License: MIT NPM version GitHub Sponsors Discord

</span>

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

<!-- - **No forks needed** - Gluon doesn't need forks of Node or Chromium/etc to use them, it just uses normal versions -->

Gluworld Screenshot showing Chrome Canary and Firefox Nightly being used at once.

<br>

Trying Gluon

  1. Clone the Gluon examples repo
  2. Inside of gluworld, run npm install
  3. Now do node . to run it!
<details> <summary>Shell example</summary>
$ git clone https://github.com/gluon-framework/examples.git
$ cd examples
$ cd gluworld
$ npm install
...
$ node .
</details> <br>

Status

Gluon began in December 2022 (from scratch), 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
Using Chromium based browsersStable
Using Firefox based browsersExperimental
Web-Node IPCStable
Idle APIExperimental
Using other JS runtimes (Deno/Bun)Experimental
<br>

Ecosystem

Apps

<br>

IPC API

Gluon has an easy to use, but powerful asynchronous IPC API. Example:

// In your website's JS
const reply = await Gluon.ipc.send('my type', { more: 'data' });
console.log(reply); // { give: 'back', different: 'stuff' }
// In your Node backend
import * as Gluon from '@gluon-framework/gluon';
const Window = await Gluon.open(...);

Window.ipc.on('my type', data => { // { more: 'data' }
  return { give: 'back', different: 'stuff' };
});
<br>

Comparisons

Internals

PartGluonElectronTauriNeutralinojs
FrontendSystem installed Chromium or FirefoxSelf-contained ChromiumSystem installed webviewSystem installed webview
BackendSystem installed or bundled Node.JSSelf-contained Node.JSNative (Rust)Native (Any)
IPCWindow objectPreloadWindow objectWindow object
StatusEarly in developmentProduction readyUsableUsable
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 Size<1MB123~220MB~1.8MB1~2.6MB1
Memory Usage~80MB2~100MB~90MB~90MB
Backend4 Memory Usage~13MB2 (Node)~22MB (Node)~3MB (Native)~3MB (Native)
Build Time~0.7s5~20s6~120s7~2s58

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.

Footnotes

  1. Does not include system installed components. 2 3

  2. Using Chrome as system browser. Early/WIP data, may change in future. 2 3

  3. How is Gluon so small? Since NodeJS is expected as a system installed component, it is "just" bundled and minified Node code.

  4. Backend like non-Web (not Chromium/WebView2/etc).

  5. Includes Node.JS spinup time. 2

  6. Built for win32 zip (not Squirrel) as a fairer comparison.

  7. Cold build (includes deps compiling) in release mode.

  8. Using neu build -r.