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

wasmbuild

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package wasmbuild builds the tailcat web WebAssembly binary and the distribution directory of static files that servers of the web app need. It is shared by cmd/tailcat-web, cmd/tailcat-webdist, and the browser integration tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(pkgDir, outPath string) error

Build compiles the Go package in pkgDir for js/wasm and writes the binary to outPath.

func Dist

func Dist(webDir, outDir string) error

Dist builds the complete set of static files a server needs to serve the web app: main.wasm (compiled from the Go package in webDir, with precompressed main.wasm.zst and main.wasm.gz variants), the toolchain's wasm_exec.js, and index.html and app.js copied from webDir. It writes them all to outDir, creating it if needed.

func GoRoot

func GoRoot() (string, error)

GoRoot returns the GOROOT of the go command in $PATH.

func WasmExecJS

func WasmExecJS() (string, error)

WasmExecJS returns the path to the Go toolchain's wasm_exec.js, the JavaScript support file needed to run Go wasm binaries.

Types

This section is empty.

Jump to

Keyboard shortcuts

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