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

lldb-wasm

v0.1.8

Published

LLDB compiled to WebAssembly for debugging wasm modules in browsers and Node.js

Readme

lldb-wasm

LLDB compiled to WebAssembly. Runs entirely in the browser or Node.js -- no native binary required. Built for debugging WebAssembly modules via a GDB remote connection.

Requirements

This package uses SharedArrayBuffer and Atomics for the virtual filesystem bridge and for pthreads inside the wasm module. In a browser context your page must be served with these headers:

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

Node.js 18+ is supported without any special flags.

Installation

npm install lldb-wasm

Usage

import { LLDBClient } from 'lldb-wasm';

// Start LLDB in a Web Worker. Returns once the wasm module is loaded.
const lldb = await LLDBClient.create();

// Connect to a GDB remote target (e.g. a browser's wasm debugging proxy).
await lldb.connect('ws://localhost:9000');

// Load the wasm module under debug.
const bytes = await fetch('/app.wasm').then((r) => r.arrayBuffer());
await lldb.attachWasmModule('app.wasm', new Uint8Array(bytes));

// Set a breakpoint and run.
const bpId = await lldb.setBreakpoint('src/main.c', 42);
await lldb.resume();

// Inspect state when stopped.
lldb.onStop(async (reason) => {
  const frames = await lldb.getStackTrace();
  const vars = await lldb.getVariables();
  console.log(reason, frames, vars);
});

// Clean up when done.
await lldb.destroy();

Logging

Pass a logger to record worker, RPC, channel, and LLDB operation lifecycle events. The interface is structural and matches common application loggers, so an existing logger can be passed directly:

const lldb = await LLDBClient.create({ logger });

The logger must provide debug(msg), info(msg), warn(msg), and error(msg). Normal lifecycle events use debug; failures use error and include the IDs of all outstanding operations. LLDB command completion logs include total duration, while start logs include time spent queued. No logging is performed when logger is omitted.

Debug Adapter Protocol

The package also embeds upstream LLDB's Debug Adapter Protocol implementation. startDAP() exposes it as a byte stream, so an embedder can connect it to an editor over stdio, a socket, or another transport without parsing or reimplementing DAP:

const dap = await lldb.startDAP({
  preInitCommands: ['platform select remote-gdb-server', 'platform connect inprocess://1'],
});

dap.onData((bytes) => editor.write(bytes));
editor.onData((bytes) => void dap.write(bytes));
editor.onEnd(() => void dap.close());

await dap.done;

The bytes retain DAP's normal Content-Length framing. preInitCommands run when the client sends initialize, before the adapter creates a target. One DAP session can be started per LLDBClient; create a new client for another session. The embedder remains responsible for any transport LLDB commands use, such as bridging the inprocess:// channel in the example.

Hosting the wasm file yourself

By default the package loads lldb-wasm.wasm (58 MB) from its own wasm/ directory. You can host it on a CDN or asset server and point the client at it:

const lldb = await LLDBClient.create({
  wasmJsUrl: 'https://cdn.example.com/lldb-wasm.js',
});

Providing source files

LLDB can read source files for display during debugging. Supply a callback that fetches file content by path:

lldb.setFileProvider(async (path) => {
  const res = await fetch(`/sources${path}`);
  if (!res.ok) return null;
  return new Uint8Array(await res.arrayBuffer());
});

Building from source

Requires Emscripten and just. From the repository root:

just build-all   # native tblgen tools + libxml2 + wasm
just npm-build   # copy artifacts + compile TypeScript

See the root justfile for all available recipes.

License

Apache-2.0