Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rhmoller/wat-tag
A tag function for compiling inline WebAssembly written in the WAT text format.
https://github.com/rhmoller/wat-tag
Last synced: 18 days ago
JSON representation
A tag function for compiling inline WebAssembly written in the WAT text format.
- Host: GitHub
- URL: https://github.com/rhmoller/wat-tag
- Owner: rhmoller
- License: mit
- Created: 2019-03-09T14:40:06.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T17:32:50.000Z (almost 2 years ago)
- Last Synced: 2024-11-30T13:51:15.331Z (23 days ago)
- Language: TypeScript
- Size: 270 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WAT Tag
A tag function for compiling inline WebAssembly written in the WAT text format.
## Installation
```bash
npm install wat-tag
```## Usage
```Typescript
import {wat} from "wat-tag";const module = await wat`
(module
(func (export "square") (param $i i32) (result i32)
get_local $i
get_local $i
i32.mul
)
)
`;
const instance = await WebAssembly.instantiate(module);
const result = instance.exports.square(3);
```This package is useful for experimenting and learning WebAssembly, but I do not recommend it for production use.
-Rene