Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Write ¶
func Write(directive *directive.Directive, modules []os.File, staticFiles map[string]os.File, targetPath string) error
Write writes a runnable bundle based loosely on https://golang.org/src/archive/zip/example_test.go staticFiles should be a map of *relative* filepaths to their associated files, with or without the `static/` prefix.
Types ¶
type Bundle ¶
type Bundle struct {
Directive *directive.Directive
Runnables []WasmModuleRef
// contains filtered or unexported fields
}
Bundle represents a Runnable bundle
type WasmModuleRef ¶
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
Click to show internal directories.
Click to hide internal directories.