Documentation ¶
Index ¶
- Variables
- func CallOutputLength(proc *exec.Process) uint32
- func Debug(proc *exec.Process, ptr uint32, len uint32)
- func GetCallOutput(proc *exec.Process, dst uint32)
- func GetInput(proc *exec.Process, dst uint32)
- func InputLength(proc *exec.Process) uint32
- func NewHostModule() *wasm.Module
- func RaiseException(proc *exec.Process, ptr uint32, len uint32)
- func ReadWasmMemory(proc *exec.Process, ptr uint32, len uint32) ([]byte, error)
- func ReadWasmModule(Code []byte, verify bool) (*exec.CompiledModule, error)
- func Ret(proc *exec.Process, ptr uint32, len uint32)
- func Sha256(proc *exec.Process, src uint32, slen uint32, dst uint32)
- func VerifyWasmModule(wasmCode []byte) error
- func VmRpc(proc *exec.Process, src uint32, slen uint32) uint32
- type Address
- type ExecEnv
- type Executor
- type HostModuleBuilder
- type Runtime
- type WasmService
Constants ¶
This section is empty.
Variables ¶
View Source
var CodeCache, _ = lru.NewARC(codeCacheSize)
Functions ¶
func CallOutputLength ¶
func GetCallOutput ¶
func InputLength ¶
func NewHostModule ¶
func ReadWasmMemory ¶
func ReadWasmModule ¶
func ReadWasmModule(Code []byte, verify bool) (*exec.CompiledModule, error)
func VerifyWasmModule ¶
Types ¶
type ExecEnv ¶
type ExecEnv struct {
Service *WasmService
}
type Executor ¶
type Executor struct { //Input []byte GasLimit uint64 ExecStep uint64 Env *ExecEnv // contains filtered or unexported fields }
func NewExecutor ¶
type HostModuleBuilder ¶
type HostModuleBuilder struct {
// contains filtered or unexported fields
}
func NewHostModuleBuilder ¶
func NewHostModuleBuilder() *HostModuleBuilder
func (*HostModuleBuilder) AppendFunc ¶
func (self *HostModuleBuilder) AppendFunc(name string, fn interface{}) error
func (*HostModuleBuilder) Finish ¶
func (self *HostModuleBuilder) Finish() *wasm.Module
type WasmService ¶
type WasmService struct {
// contains filtered or unexported fields
}
func NewWasmService ¶
func NewWasmService() *WasmService
func (*WasmService) Call ¶
func (self *WasmService) Call(method string, argv interface{}, reply interface{}) error
func (*WasmService) HandleWasmRequest ¶
func (self *WasmService) HandleWasmRequest(req []byte) (rep []byte, err error)
func (*WasmService) Register ¶
func (self *WasmService) Register(name string, fnval interface{}) error
fnval must be a func with signature: func (req T, reply *O) error
Click to show internal directories.
Click to hide internal directories.