# @emnudge/rollup-plugin-wat

> Import typed WAT with Rollup

Latest version **0.3.0** (published 2023-07-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @emnudge/rollup-plugin-wat
pnpm add @emnudge/rollup-plugin-wat
yarn add @emnudge/rollup-plugin-wat
bun add @emnudge/rollup-plugin-wat
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2023-07-20 |
| First published | 2023-07-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=14.0.0 |
| Dependencies | 4 |
| Unpacked size | 11.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | EmNudge |
| Maintainers | emnudge |
| Keywords | rollup, plugin, webassembly, wasm, wast, wat, typescript |

## Links

- npm: https://www.npmjs.com/package/@emnudge/rollup-plugin-wat
- Repository: https://github.com/EmNudge/rollup-plugin-wat
- Issues: https://github.com/EmNudge/rollup-plugin-wat/issues
- npm.io page: https://npm.io/package/@emnudge/rollup-plugin-wat

## Dependencies (4)

- [wabt](https://npm.io/package/wabt.md) ^1.0.32
- [tslib](https://npm.io/package/tslib.md) ^2.6.0
- [@rollup/plugin-typescript](https://npm.io/package/@rollup/plugin-typescript.md) ^11.1.2
- [@webassemblyjs/wast-parser](https://npm.io/package/@webassemblyjs/wast-parser.md) ^1.11.6

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2023-07-20
- 0.2.0 — 2023-07-19
- 0.1.1 — 2023-07-17
- 0.1.0 — 2023-07-17

## README

# rollup-plugin-wat

A Rollup plugin for directly importing "[WebAssembly Text Format](https://developer.mozilla.org/en-US/docs/WebAssembly/Understanding_the_text_format)" files.

Imports are dynamically typed via creation of a local `.d.ts` file next to the `.wat` source.

https://github.com/EmNudge/rollup-plugin-wat/assets/24513691/324ab107-8969-4e3d-8553-aeacdd028e9a

## Install

using npm
```sh
npm install --save-dev @emnudge/rollup-plugin-wat 
```

## Usage

Add the plugin to your `plugins` array in your `rollup.config.js` file.

```js
import { wat } from '@emnudge/rollup-plugin-wat';

export default {
  // ...some other config
  plugins: [wat()]
}
```

## Credits

* General package setup copied from [@rollup/plugin-wasm](https://github.com/rollup/plugins/tree/master/packages/wasm).
* [wat2wasm](https://github.com/WebAssembly/wabt) npm package from [AssemblyScript](https://github.com/AssemblyScript/wabt.js) for creating wasm from wat files
* [webassembly.js](https://github.com/xtuc/webassemblyjs) for the AST used for extracting type information

---
_Source: https://npm.io/package/@emnudge/rollup-plugin-wat · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
