Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
pkg
src
README.md
package-lock.json
package.json

README.md

@pika/plugin-wasm-bindings

A @pika/pack build plugin. Adds simple JavaScript bindings that work with any WASM file.

Install

# npm:
npm install @pika/plugin-wasm-bindings --save-dev
# yarn:
yarn add @pika/plugin-wasm-bindings --dev

Usage

{
  "name": "example-package-json",
  "version": "1.0.0",
  "@pika/pack": {
    "pipeline": [
      ["@pika/plugin-wasm-assemblyscript"],
      ["@pika/plugin-wasm-bindings"],
      ["@pika/plugin-build-web"]
    ]
  }
}

For more information about @pika/pack & help getting started, check out the main project repo.

Result

  1. Adds ES2018 JavaScript bindings to your package: dist-src/index.js
  2. Adds an "esnext" entrypoint to your built package.json manifest.

Note that this plugin is only responsible for building the WASM bindings. Be sure to include a plugin that compiles the relevant WASM asset.