Documentation ¶
Overview ¶
Package executor contains the executors that perform a specific action on the Wasm code tree (Module) that they operate on. The executors keep track of their execution state in corresponding context objects.
Index ¶
Constants ¶
const DEBUG_MODULE = "xxx.wasm"
const MAX_LOCALS = 1060
test-guard-page-skip tests with 1056 i64 = 8448 bytes of locals
Variables ¶
var Modules = make(map[string]*sections.Module)
var TotalNrFailed int
var TotalNrOfTests int
Functions ¶
This section is empty.
Types ¶
type WasmAnalyzer ¶
type WasmAnalyzer struct {
// contains filtered or unexported fields
}
WasmAnalyzer is an executor that analyzes the Module for validity and prepares it for running by other executors.
func NewWasmAnalyzer ¶
func NewWasmAnalyzer(m *sections.Module) *WasmAnalyzer
func (*WasmAnalyzer) Analyze ¶
func (ctx *WasmAnalyzer) Analyze() error
type WasmLinker ¶
type WasmLinker struct {
// contains filtered or unexported fields
}
func NewWasmLinker ¶
func NewWasmLinker(m *sections.Module) *WasmLinker
func (*WasmLinker) Link ¶
func (lnk *WasmLinker) Link() error
type WasmReader ¶
type WasmReader struct {
// contains filtered or unexported fields
}
WasmReader is an executor that reads a binary Wasm file and converts it to a Module.
func NewWasmReader ¶
func NewWasmReader(m *sections.Module, data []byte) *WasmReader
func (*WasmReader) Read ¶
func (ctx *WasmReader) Read() error
type WasmRunner ¶ added in v0.0.5
type WasmRunner struct {
// contains filtered or unexported fields
}
func NewWasmRunner ¶ added in v0.0.5
func NewWasmRunner(host interfaces.HostInterface) *WasmRunner
func (*WasmRunner) Load ¶ added in v0.0.5
func (r *WasmRunner) Load(path string) error
func (*WasmRunner) Module ¶ added in v0.0.5
func (r *WasmRunner) Module() *sections.Module
func (*WasmRunner) RunExport ¶ added in v0.0.9
func (r *WasmRunner) RunExport(exportName string) error
func (*WasmRunner) RunFunction ¶ added in v0.0.9
func (r *WasmRunner) RunFunction(function *sections.Function) error
type WasmTester ¶
type WasmTester struct { Error error // contains filtered or unexported fields }
WasmReader is an executor that reads a tests.json file and uses its data to run a series of unit tests on Wasm modules in the same folder.
func NewWasmTester ¶
func NewWasmTester(path string, isSpecTest bool) *WasmTester
func (*WasmTester) Test ¶
func (tst *WasmTester) Test()
type WasmWriter ¶
type WasmWriter struct {
// contains filtered or unexported fields
}
WasmWriter is an executor that creates binary Wasm data from a Module.
func NewWasmWriter ¶
func NewWasmWriter(m *sections.Module) *WasmWriter
func (*WasmWriter) Data ¶
func (ctx *WasmWriter) Data() []byte
func (*WasmWriter) Write ¶
func (ctx *WasmWriter) Write()
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package context contains the context objects for the executors that perform a specific action on the Wasm code tree (Module) that they operate on.
|
Package context contains the context objects for the executors that perform a specific action on the Wasm code tree (Module) that they operate on. |
test
Package test contains all the extra POGO that are needed to read the tests.json file that is processed by the WasmTester executor.
|
Package test contains all the extra POGO that are needed to read the tests.json file that is processed by the WasmTester executor. |