You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

unwasm

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unwasm

WebAssembly tools for JavaScript

0.0.1
Source
npmnpm
Version published
Weekly downloads
718K
1.7%
Maintainers
1
Weekly downloads
 
Created
Source

🇼 unwasm

npm version npm downloads Codecov

Universal WebAssembly tools for JavaScript.

Goal

This project aims to make a common and future-proof solution for WebAssembly modules support suitable for various JavaScript runtimes, Frameworks, and build Tools following WebAssembly/ES Module Integration proposal from WebAssembly Community Group as much as possible.

Roadmap

The development will be split into multiple stages.

[!IMPORTANT] This Project is under development! Join the linked discussions to be involved!

  • Universal builder plugins (unjs/unwasm#2) built with unjs/unplugin
    • Rollup
  • Tools to operate and inspect .wasm files (unjs/unwasm#3)
  • Runtime utils (unjs/unwasm#4)
  • ESM loader for Node.js and other JavaScript runtimes (unjs/unwasm#5)
  • Integration with Wasmer (unjs/unwasm#6)
  • Convention and tools for library authors exporting wasm modules (unjs/unwasm#7)

Install

Install package from npm:

# npm
npm install unwasm

# yarn
yarn add unwasm

# pnpm
pnpm install unwasm

# bun
bun install unwasm

Using build plugin

Rollup
import unwasmPlugin from "unwasm/plugin";

export default {
  plugins: [
    unwasmPlugin.rollup({
      /* options */
    }),
  ],
};

Options

  • esmImport: Direct import the wasm file instead of bundling, required in Cloudflare Workers (default is false)
  • lazy: Import .wasm files using a lazily evaluated promise for compatibility with runtimes without top-level await support (default is false)

Development

  • Clone this repository
  • Install the latest LTS version of Node.js
  • Enable Corepack using corepack enable
  • Install dependencies using pnpm install
  • Run interactive tests using pnpm dev

License

Made with 💛

Published under MIT License.

FAQs

Package last updated on 27 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.