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

@julclang/julc-vm-wasm

v0.1.0-pre22

Published

JuLC's Plutus VM as WebAssembly, for browsers and Node.js: decode, hash, apply parameters to, evaluate and debug Plutus V1, V2 and V3 scripts. Experimental: API version 0.

Readme

@julclang/julc-vm-wasm

JuLC's Plutus virtual machine, compiled to WebAssembly, for browsers and Node.js. It decodes, hashes, evaluates and debugs Plutus V1, V2 and V3 scripts (UPLC 1.0.0 and 1.1.0), and applies parameters to them: vm.applyParams returns the applied script and its hash under the language the request states (V1, V2 or V3). It runs in a worker, through @julclang/wasm-client, which this package depends on at its own exact version. For the Java compiler, the decompiler and source debugging as well, install @julclang/julc-wasm instead.

Experimental. The JavaScript API is version 0 and may change in any release before 1.0; the release notes list every change. JuLC is a research project: do not treat a result as proof that a contract is safe to deploy.

Versions

The npm version is the JuLC release version. Dist-tags:

| Install | Gets | |---|---| | npm install @julclang/julc-vm-wasm | latest: the newest -preN until JuLC's first final release; then the newest final release, unless that final is older than the -preN on latest (see below) | | npm install @julclang/julc-vm-wasm@preview | the newest -preN prerelease after a final release | | npm install @julclang/julc-vm-wasm@beta | the newest -betaN | | npm install @julclang/julc-vm-wasm@next | the newest release candidate of a final release (X.Y.Z-rcN) |

  • A channel (preview, beta, next) exists only after its first version; until then installing it fails.
  • A final release does not reset the channels, so after one a channel can name a version older than latest.
  • No dist-tag ever moves to an older version: a version older than the one a tag names (a backfilled first final after a -preN on latest, or a -betaN after a -preN of the same X.Y.Z, which semver orders below it) is on a release-<major>.<minor> or release-<version> tag instead. Such a backfilled final leaves latest on that older prerelease, and later -preNs go to preview, until a final higher than it is published.
  • Pin a prerelease exactly ("@julclang/julc-vm-wasm": "0.1.0-pre22"): a caret range such as ^0.1.0-pre21 also matches a later 0.1.0-rcN.

Use

import {createJulcVm} from '@julclang/julc-vm-wasm';

const julc = await createJulcVm();
try {
  const {info} = await julc.vm.decode({script: {script: '46450101002499'}});
  console.log(info.scriptHash);
  const evaluation = await julc.vm.evaluate({script: {script: '46450101002499'}});
  console.log(evaluation.status, evaluation.cpu, evaluation.mem);
  // Apply the integer 42 to a parameterised script (the language is always stated).
  const applied = await julc.vm.applyParams({language: 'V3', script: {script: '46450101002499'}, params: [{int: 42n}]});
  console.log(applied.cborHex, applied.scriptHash);
} finally {
  julc.dispose();
}

Each client runs the engine in its own worker (worker_threads in Node.js); dispose() ends it. The package's version is the JuLC release, and the client refuses to run an engine, a manifest or a runtime file of another release. createJulcVm(options) takes timeoutMs, loadTimeoutMs and workerFactory; the engine's files are always this package's. The types of every request and response are exported from the package root. The subpath ./engine describes the engine: its frozen manifest, launcherUrl, moduleUrl and version, and engineFiles(), which returns new copies of them, for example for @julclang/wasm-client's own createJulc.

Size and requirements

  • The WebAssembly module is 14.5 MB (uncompressed). Serve it compressed: it compresses well.

  • First load: a client was ready in about 0.2 s in Node.js 22 and 24 and in Chromium on an Apple-silicon laptop, with the module already on disk or in the HTTP cache. Network transfer comes on top.

  • Browsers: WebAssembly GC and exception references (exnref). Tested in Chromium 156.0.8078.4; Firefox and Safari are not tested yet. BLS12-381 builtins are not available in WebAssembly.

  • TypeScript 5.0 or later for the declarations, which re-export @julclang/wasm-client's types with export type *.

  • Node.js 22.3.0 or later. Node 22 enables WebAssembly exception references only with --experimental-wasm-exnref: the client checks for them before it starts its first worker and, when they are missing, sets that flag with v8.setFlagsFromString. The flag is process-wide. Node 24 needs nothing. The engine also loads inside your own worker_threads worker.

  • Node.js security releases: engines (>=22.3.0) is the lowest version that works, not a recommendation. Run a supported Node.js release line, updated to its latest security release.

  • Content Security Policy: script-src 'self' 'wasm-unsafe-eval', on the page and on the responses of the worker scripts, the runtime and the launcher (a worker script has its own policy). No 'unsafe-eval' is needed.

  • Origins: in a browser the worker loads the engine's files only from its own origin, which must not be opaque. Other hosts, such as Electron with a custom scheme registered as standard, are untested; an Electron page loaded from file: is refused.

  • Chrome extensions (tested with an unpacked Manifest V3 extension page): Manifest V3's default policy does not allow WebAssembly, so the manifest must:

    "content_security_policy": {"extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'"}

Bundlers

The engine's files are named by new URL('./engine/…', import.meta.url) in engine.js, and the worker by new Worker(new URL('./julc-worker.js', import.meta.url)) in @julclang/wasm-client, so bundlers copy them.

  • Vite 8 needs no configuration. The development servers of Vite 5 to 7 need both packages excluded from dependency pre-bundling; their production builds need nothing:

    // vite.config.js
    export default {optimizeDeps: {exclude: ['@julclang/wasm-client', '@julclang/julc-vm-wasm']}};
  • webpack 5 works with no configuration, but its Terser minifies the engine's launcher. To ship the launcher unchanged, emit the engine files as assets and keep them out of minification:

    // webpack.config.cjs
    const TerserPlugin = require('terser-webpack-plugin');
    module.exports = {
      module: {rules: [{test: /[\\/]@julclang[\\/][^\\/]+[\\/]engine[\\/]/, type: 'asset/resource',
        generator: {filename: 'engine/[name]-[contenthash:8][ext]'}}]},
      optimization: {minimizer: [new TerserPlugin({exclude: /^engine\//})]},
    };
  • Plain <script type="module"> with an import map naming both packages' index.js works without a bundler.

  • Server bundles: webpack with target: 'node' (its Terser minifies the launcher here too, which still works), and Next.js with Turbopack (next build, next dev and output: 'standalone'), work as they are. esbuild does not copy files named by new URL: keep the packages external (--packages=external, or external: ['@julclang/*']). Next.js with --webpack rewrites the URLs: list both packages in serverExternalPackages.

Version 0.1.0-pre22. Source, issues and the design (ADR-077): https://github.com/bloxbean/julc