Help us shape the future of Go! Take the 2026 Go Developer Survey

binaryen

package
v0.1.71 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 8 Imported by: 0

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