Skip to content

Showcases

The showcases are end-to-end runnable applications that double as proof of the @gjsify/* pillar set’s coverage. Every showcase runs in two places from the same source:

  • In a GTK4 window via gjsify showcase <name> — Cairo / WebGL / WebKit / GStreamer backing the standard DOM APIs the showcase code reaches for.
  • In a regular browser via import { mount } from '@gjsify/example-dom-<name>/browser' — same module, native browser implementations.

If something runs on GJS through gjsify, it also runs in the browser unmodified (and vice versa). That cross-platform contract is the point.

ShowcasePillar focusBrowser demo
adwaita-storybookAdwaita + @gjsify/adwaita-web + @gjsify/storybookInteractive Libadwaita component browser (native GTK + browser, one shared story)
canvas2d-fireworksDOM + @gjsify/canvas2dParticle fireworks on a Canvas2DBridge / <canvas>
excalibur-jelly-jumperDOM + @gjsify/webgl + @gjsify/xmlhttprequestExcalibur.js 2D platformer with Tiled tilemaps
three-geometry-teapotDOM + @gjsify/webglThree.js Utah teapot with parameter controls
three-postprocessing-pixelDOM + @gjsify/webgl + post FXThree.js pixel-art post-processing pipeline
minimalist-browserDOM + @gjsify/iframeURL bar + <iframe> (WebKit on GJS, real <iframe> in browser)
webrtc-loopback@gjsify/webrtcTwo local peers exchange offer/answer + RTCDataChannel
webrtc-video@gjsify/webrtc + @gjsify/videoWebcam preview — getUserMedia stream rendered through VideoBridge / native <video>
express-webserverNode — @gjsify/http + expressExpress HTTP server running unmodified on GJS
gjsify showcase # list all
gjsify showcase canvas2d-fireworks # run on GJS (opens a GTK4 window)

The CLI resolves the showcase’s npm package (every showcase is published as @gjsify/example-<category>-<name>) and launches its GJS bundle via gjs -m. Native dependencies (Vala typelibs) are auto-discovered from node_modules’s prebuild directories.

Every showcase ships a ./browser export pointing at a TS module you can mount into any DOM container:

import { mount } from '@gjsify/example-dom-canvas2d-fireworks/browser';
const container = document.getElementById('app')!;
mount(container);

The website’s <ShowcaseEmbed> component handles the loading and lifecycle for the live demos linked above. Source for each showcase lives under showcases/ in the gjsify repo — see the per-showcase pages for the deep dive on how each one exercises the pillar set.

Showcases are how we prove the cross-platform contract: code written against standard DOM / Web APIs runs unmodified on both. Every gap surfaced by a showcase (a missing event, an unhandled Canvas method, a Web API stub) becomes a bug-fix in the underlying @gjsify/* package — never patched at the consumer level. The browser entry is the ground truth, the GJS entry validates we match it.

When the matrix grows (new pillars, new bridges, new Vala extensions), showcases grow with it.