bundle

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(directive *directive.Directive, files []os.File, targetPath string) error

Write writes a runnable bundle based loosely on https://golang.org/src/archive/zip/example_test.go

Types

type Bundle

type Bundle struct {
	Directive *directive.Directive
	Runnables []WasmModuleRef
}

Bundle represents a Runnable bundle

func Read

func Read(path string) (*Bundle, error)

Read reads a .wasm.zip file and returns the bundle of wasm modules (suitable to be loaded into a wasmer instance)

type WasmModuleRef

type WasmModuleRef struct {
	Filepath string
	Name     string
	// contains filtered or unexported fields
}

WasmModuleRef is a reference to a Wasm module (either its filepath or its bytes)

func (*WasmModuleRef) ModuleBytes

func (w *WasmModuleRef) ModuleBytes() ([]byte, error)

ModuleBytes returns the bytes for the module

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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