Documentation ¶
Index ¶
- func Params(kinds ...wasmer.ValueKind) []*wasmer.ValueType
- func Returns(kinds ...wasmer.ValueKind) []*wasmer.ValueType
- type Heap
- type Input
- type InputType
- type Instance
- func (i *Instance) Err() error
- func (i *Instance) Execute() (err error)
- func (i *Instance) ExecuteWithArgs(args ...interface{}) (err error)
- func (i *Instance) Heap() *Heap
- func (i *Instance) Output() []byte
- func (i *Instance) PrintStats()
- func (i *Instance) ReachedLogsMaxByteCount() bool
- func (i *Instance) SetOutputStore(store *state.Store)
- func (i *Instance) Store() *wasmer.Store
- func (i *Instance) WriteOutputToHeap(outputPtr int32, value []byte) error
- type Module
- type PanicError
- type Runtime
- type WASMExtension
- type WASMExtensioner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Input ¶
type Input struct { Type InputType Name string // Transient data between calls StreamData []byte // InputType == InputStore || OutputStore Store *state.Store Deltas bool // whether we want to have the Deltas instead of an access to the store // If InputType == OutputStore UpdatePolicy pbsubstreams.Module_KindStore_UpdatePolicy ValueType string }
type Instance ¶
type Instance struct { Logs []string LogsByteCount uint64 // contains filtered or unexported fields }
func (*Instance) ExecuteWithArgs ¶
func (*Instance) PrintStats ¶
func (i *Instance) PrintStats()
func (*Instance) ReachedLogsMaxByteCount ¶
func (*Instance) SetOutputStore ¶
type Module ¶
type Module struct { CurrentInstance *Instance // contains filtered or unexported fields }
func (*Module) NewInstance ¶
type PanicError ¶
type PanicError struct {
// contains filtered or unexported fields
}
func (*PanicError) Error ¶
func (e *PanicError) Error() string
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
func NewRuntime ¶
func NewRuntime(extensions []WASMExtensioner) *Runtime
type WASMExtension ¶
type WASMExtension func(ctx context.Context, request *pbsubstreams.Request, clock *pbsubstreams.Clock, in []byte) (out []byte, err error)
WASMExtension defines the implementation of a function that will be exposed as wasm imports; therefore, exposed to the host language like Rust.
For example, this can be an RPC call, taking a structured request in `in` and outputting a structured response in `out`, both serialized as protobuf messages.
Such a function needs to be registered through RegisterRuntime.
type WASMExtensioner ¶
type WASMExtensioner interface {
WASMExtensions() map[string]map[string]WASMExtension
}
Click to show internal directories.
Click to hide internal directories.