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

@wllama/wllama-compat

v3.5.1

Published

Optional package providing compatibility with older browsers for @wllama/wllama

Downloads

1,197

Readme

@wllama/wllama-compat

Optional package that provides compatibility WASM assets for @wllama/wllama on browsers that lack JSPI or MEMORY64 support - most notably Safari and older browsers.

Why this package exists

The default @wllama/wllama build relies on two modern WebAssembly features: JSPI and MEMORY64

When either feature is absent, wllama automatically falls back to compat mode: a separate WASM build that uses Asyncify instead of JSPI, and drops MEMORY64.

Note: Compat mode has significantly lower performance than the default build. Use it only as a fallback.

Browser compatibility

| | Chromium | Firefox | Safari | |---|---|---|---| | Auto-compat (default, recommended) | ✅ | 🟡 (no WebGPU) | 🟡 (supports WebGPU) | | Force-compat | ✅ | 🔴 (supports WebGPU) | 🟡 (supports WebGPU) | | Non-compat mode | ✅ | 🟡 (no WebGPU) | ❌ |

  • ✅: Good speed
  • 🟡: Acceptable speed
  • 🔴: Runs but slow, not usable
  • ❌: Does not run at all

Default behaviour

Out of the box, wllama fetches the compat assets from jsDelivr CDN when compat mode is needed. If you want to self-host the assets (no external CDN dependency), install this package (see new section.)

Recommended preset

By default (mode = 'safari'), compat is disabled on Firefox because WebGPU via compat mode is extremely slow there. This is the recommended behaviour:

wllama.setCompat('default');

If you also want compat on Firefox (e.g. to reach users without JSPI enabled), pass 'firefox_safari':

wllama.setCompat('default', 'firefox_safari');

Disabling compat mode

To opt out of compat mode completely (e.g. you don't target Safari):

wllama.setCompat(null);

Using this package

You only need to install package if you want to store compat assets locally. By default, assets are pulled from CDN.

npm install @wllama/wllama-compat

Then copy the assets from node_modules/@wllama/wllama-compat/wasm/ to your public directory and call setCompat() with the URLs pointing to those files:

import { Wllama } from '@wllama/wllama';

const wllama = new Wllama({ default: '/wasm/wllama.wasm' });

wllama.setCompat({
  wasm: '/wllama-compat/wasm/wllama.wasm',
  worker: '/wllama-compat/wasm/wllama.js',
});

IMPORTANT: for Vite, you will need to import the JS as ?raw

import compatWasm from '@wllama/wllama-compat/wasm/wllama.wasm?url';
import compatWorker from '@wllama/wllama-compat/wasm/wllama.js?raw'; // IMPORTANT: ?raw, NOT ?url

export const WLLAMA_COMPAT_CONFIG = {
  wasm: compatWasm,
  worker: {
    code: compatWorker,
  },
};

const instance = new Wllama(WLLAMA_CONFIG_PATHS, { logger: DebugLogger });
instance.setCompat(WLLAMA_COMPAT_CONFIG);