Socket
Socket
Sign inDemoInstall

@webassemblyjs/wast-printer

Package Overview
Dependencies
6
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webassemblyjs/wast-printer

WebAssembly text format printer


Version published
Maintainers
1
Weekly downloads
22,251,234
decreased by-8.91%

Weekly downloads

Package description

What is @webassemblyjs/wast-printer?

The @webassemblyjs/wast-printer package is a tool for converting WebAssembly binary format (Wasm) into WebAssembly Text format (WAT), also known as WAST. This is particularly useful for debugging, optimization, and learning purposes, as WAT is a human-readable representation of WebAssembly code.

What are @webassemblyjs/wast-printer's main functionalities?

Printing Wasm to WAT

This feature allows you to parse a WAST string to create an abstract syntax tree (AST) and then print that AST back into a WAST string. It's useful for generating human-readable WAT/WAST from WebAssembly binaries or ASTs.

"const { parse } = require('@webassemblyjs/wast-parser');\nconst { print } = require('@webassemblyjs/wast-printer');\nconst wast = '(module)';\nconst ast = parse(wast);\nconst output = print(ast);\nconsole.log(output);"

Other packages similar to @webassemblyjs/wast-printer

Readme

Source

@webassemblyjs/wast-parser

WebAssembly text format printer

Installation

yarn add @webassemblyjs/wast-printer

Usage

import { print } from "@webassemblyjs/wast-printer"

console.log(print(ast));

Keywords

FAQs

Last updated on 09 May 2023

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc