npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gecko.wasm

v0.0.0

Published

Embeddable Gecko (Firefox engine) compiled to WebAssembly. ESM library exporting a Gecko API class.

Readme

gecko.js

Embeddable Gecko — Firefox's rendering engine — compiled to WebAssembly, as an ESM library with a small API class. It lays out and paints real web content into a <canvas> entirely in the browser tab and forwards mouse/keyboard/wheel input.

import { Gecko } from 'gecko.js';

const gecko = new Gecko({ canvas: document.querySelector('canvas')! });
await gecko.init();
await gecko.load('data:text/html,<h1>hello from Gecko</h1>');

What it ships

The library bundle (dist/gecko.js) inlines the emscripten glue (gecko.js) and the pthread worker (gecko.worker.js) — they run from Blob URLs, so you never serve them. The only assets you serve are the two large binaries, gecko.wasm and gecko.data (they ship in dist/; point libxul at where you serve them with assetBase). Because pthreads need SharedArrayBuffer, the page must be cross-origin isolated (Cross-Origin-Opener-Policy: same-origin + Cross-Origin-Embedder-Policy: require-corp).

gecko.data contains only the minimal GRE needed to render a web page. Larger trees that a basic embed doesn't need — notably the Firefox front-end (browser/) — are left out; supply them yourself with an fs provider.

GeckoOptions

| option | meaning | | --- | --- | | canvas | the page <canvas> to paint into (software composited) | | env | extra engine env vars (e.g. { GECKO_CHROME: '1' }) | | fs | { readFile, readdir } supplying GRE files beyond the baked set (mounted under /gre) | | wispUrl | WISP websocket endpoint; Necko fetches http(s):// over it | | assetBase | URL prefix where you serve gecko.wasm + gecko.data (default ./, relative to the page) | | locateFile, print, printErr, width, height, forwardInput | as named |

The fs provider

readdir(path) returns child names (directories suffixed with /); readFile(path) returns the bytes. The provider root maps to /gre. See chrome-demo for a provider that serves the Firefox front-end so the full browser UI boots (GECKO_CHROME=1).

Building

gecko.* is produced by build-lib.sh (stages the engine libs + a minimal GRE, then emcc-links), and dist/ by rspack (rspack.config.js). Both run via:

make libxul        # from the repo root: builds the engine then the bundle
# or, with the engine already built (obj-full-emscripten/dist/bin/libxul.so):
pnpm --filter gecko.js build