binaryen

package
v0.1.103 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package binaryen installs Binaryen and optimizes WebAssembly modules with its wasm-opt.

Index

Constants

View Source
const Version = "version_133"

Version is the Binaryen release that optimizes modules.

Variables

This section is empty.

Functions

func Optimize

func Optimize(ctx context.Context, wasm []byte) ([]byte, error)

Optimize returns wasm after wasm-opt's -O2 passes, which shrink a scriptc module by about a fifth in seconds. The passes keep the module's imports and exports.

func WasmOpt

func WasmOpt(ctx context.Context) (string, error)

WasmOpt returns the path of wasm-opt for this system, downloading the release into the user cache the first time.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL