internal

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runtime

type Runtime struct {
	// contains filtered or unexported fields
}

Runtime manages the WASM module execution.

func NewRuntime

func NewRuntime(ctx context.Context, wasmBinary []byte) (*Runtime, error)

NewRuntime creates a new WASM runtime with AOT compilation. This takes ~50ms for compilation, so create once and reuse.

func (*Runtime) Close

func (r *Runtime) Close(ctx context.Context) error

Close releases all runtime resources.

func (*Runtime) ContractInfo

func (r *Runtime) ContractInfo(ctx context.Context, code []byte, opts uint32) ([]byte, error)

ContractInfo analyzes bytecode and returns the JSON result.

Jump to

Keyboard shortcuts

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