module

package
v0.20.21 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

module serves to manipulate wasm module binaries and interact with them. Currently its only functionality is to set a custom section.

The implementation was adapted from: https://github.com/hypermodeinc/modus/blob/b2a472c0cf869fab67868d8f5067a3bd44609e58/sdk/go/tools/modus-go-build/wasm/wasm.go#L33

Index

Constants

View Source
const (
	PrefixSchematics    = "yoke.schematics:"
	PrefixSchematicsCMD = "yoke.schematics.cmd:"
)

Variables

This section is empty.

Functions

func CutSchematicsPrefix

func CutSchematicsPrefix(name string) (string, string, bool)

func GetCustomSections

func GetCustomSections(wasm []byte) map[string][]byte

func StripSchematicsPrefix

func StripSchematicsPrefix(name string) string

func ValidatePreamble

func ValidatePreamble(wasm []byte) error

func WithCustomSectionCMD

func WithCustomSectionCMD(wasm []byte, name string, cmd []string) []byte

func WithCustomSectionData

func WithCustomSectionData(wasm []byte, name string, data []byte) []byte

func WithoutCustomSection added in v0.20.8

func WithoutCustomSection(wasm []byte, name string) ([]byte, []byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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