Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewModuleConfig ¶
func NewModuleConfig(m *InitMetadata) wazero.ModuleConfig
NewModuleConfig returns a new module config appropriate for the initialized metadata.
Types ¶
type InitMetadata ¶
type InitMetadata struct { // URL is how to load a `%.wasm` file that implements a command, usually // compiled to target WASI. // // If no scheme is present, this defaults to oci://, referencing an OCI // image. The wasm is identified be ENTRYPOINT and any other files in the // corresponding layers will be mounted read-only as the root file system. // // Other valid schemes are file:// for a local file or http[s]:// for one // retrieved via HTTP. In these cases, no filesystem will be mounted. URL string `mapstructure:"url"` // StrictSandbox when true uses fake sources to avoid vulnerabilities such // as timing attacks. // // # Affected configuration // // - sys.Walltime increments with a constant value when read, initially a // second resolution of the current system time. // - sys.Nanotime increments with a constant value when read, initially // zero. // - sys.Nanosleep returns immediately. // - Random number generators are seeded with a deterministic source. StrictSandbox bool `mapstructure:"strictSandbox"` // Guest is WebAssembly binary implementing the guest, loaded from URL. Guest []byte `mapstructure:"-"` // GuestName is module name of the guest, loaded from URL. GuestName string `mapstructure:"-"` }
func GetInitMetadata ¶
GetInitMetadata returns InitMetadata from the input metadata.
Click to show internal directories.
Click to hide internal directories.