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
tsconfig.json

README.md

@pika/plugin-wasm-assemblyscript

A @pika/pack build plugin. Builds TypeScript as WASM via AssemblyScript.

Install

# npm:
npm install @pika/plugin-wasm-assemblyscript --save-dev
# yarn:
yarn add @pika/plugin-wasm-assemblyscript --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

Unlike other build plugins, this plugin reads directly from your package src/ directory. Make sure your code exists in a src/ directory, with an index.ts file as the package entrypoint.

  1. Compiles your TypeScript to WASM: assets/index.wasm

Note that this plugin is only responsible for building the WASM asset. Be sure to include JavaScript bindings so that your package can be loaded like any other JavaScript module.