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

@slothfulchat/core-wasm

v0.6.0

Published

chatmail core compiled to WebAssembly, exposed through the standard @deltachat/jsonrpc-client TypeScript API. Core runs in a Web Worker.

Downloads

791

Readme

@slothfulchat/core-wasm

chatmail core compiled to WebAssembly, exposed through the standard @deltachat/jsonrpc-client TypeScript API. Core runs in a Web Worker; the page talks to it over a yerpc transport bridging postMessage — the exact seam where deltachat-desktop's browser edition uses a WebSocket.

import { startCore } from '@slothfulchat/core-wasm'

const core = startCore()
const { dc, transport } = core
await dc.rpc.getSystemInfo()          // typed, generated from core
await transport.request('get_system_info') // raw JSON-RPC
dc.on('event', ({ contextId, event }) => ...) // core events

Hosted demo: https://web.slothful.chat/demo/ — the same page the example script below serves locally. Pass ?proxy=ws://localhost:8641 to enable networking (instructions on the page).

startCore() also returns an fs side channel into core's in-memory filesystem (blob display, temp files, backup import/export):

await core.fsWrite('/tmp/a/b.bin', new Uint8Array([1, 2, 3])) // creates parent dirs
await core.fsExists('/tmp/a/b.bin') // -> true
await core.fsRead('/tmp/a/b.bin')   // -> Uint8Array, rejects if missing
await core.fsRemove('/tmp/a/b.bin') // file or directory tree

Build (from repo root)

pnpm apply-patches                                # patched core in build/core
cd build/core/deltachat-jsonrpc/typescript
pnpm install --ignore-workspace && cargo test -p deltachat-jsonrpc \
  && node scripts/generate-constants.js && ./node_modules/.bin/tsc \
  && ./node_modules/.bin/esbuild --format=esm --bundle dist/deltachat.js --outfile=dist/deltachat.bundle.js
cd -                                              # generated TS client at the pinned commit
pnpm install
pnpm --filter @slothfulchat/core-wasm build:wasm  # needs clang + wasm32 target, ~10 min release
pnpm --filter @slothfulchat/core-wasm build
pnpm smoke                                        # headless verification
pnpm --filter @slothfulchat/core-wasm example     # http://localhost:8642/example/index.html

Networking & persistence

  • IMAP/SMTP/DNS tunnel through a WebSocket→TCP bridge: run @slothfulchat/ws-tcp-proxy and pass startCore({ wsProxyUrl: 'ws://localhost:8641' }). TLS terminates inside the wasm core — the bridge only ever relays ciphertext. Without a bridge, networking errors at runtime (everything else works).
  • Storage (accounts, messages, blobs) persists in OPFS by default and survives reloads; pass persist: false for a fresh in-memory core.

Current limits

  • Core's HTTP goes through the browser's fetch(), so requests are subject to CORS: endpoints without permissive CORS headers fail (some provider autoconfig/OAuth2 servers); ones with them work (e.g. the webxdc apps list). Push notifications don't work.
  • One tab at a time: with persistence on, the core holds an exclusive lock on its OPFS storage, so a second tab of the same app fails to start its core until the first is closed.
  • No sqlcipher; webxdc and iroh are descoped.
  • Always use release wasm builds; dev-profile wasm crashes the tab.