Documentation ¶
Index ¶
- func NewEIGenWriter(pathToApiPackage string, relativePath string) *eiGenWriter
- func ReadAndParseEIMetadata(fset *token.FileSet, pathToSources string, eiMetadata *EIMetadata) error
- func WriteEIInterface(out *eiGenWriter, eiMetadata *EIMetadata)
- func WriteExecutorOpcodeCost(out *eiGenWriter)
- func WriteNames(out *eiGenWriter, packageName string, eiMetadata *EIMetadata)
- func WriteOpcodeCostFuncHelpers(out *eiGenWriter)
- func WriteRustCapiVMHooks(out *eiGenWriter, eiMetadata *EIMetadata)
- func WriteRustCapiVMHooksPointers(out *eiGenWriter, eiMetadata *EIMetadata)
- func WriteRustHookNames(out *eiGenWriter, eiMetadata *EIMetadata)
- func WriteRustOpcodeCost(out *eiGenWriter)
- func WriteRustVMHooksTrait(out *eiGenWriter, eiMetadata *EIMetadata)
- func WriteRustWasmerImports(out *eiGenWriter, eiMetadata *EIMetadata)
- func WriteRustWasmerMeteringHelpers(out *eiGenWriter)
- func WriteVMHooksWrapper(out *eiGenWriter, eiMetadata *EIMetadata)
- func WriteWASMOpcodeCostConfigHelpers(out *eiGenWriter)
- func WriteWASMOpcodeCostFuncHelpers(out *eiGenWriter)
- func WriteWasmer1Cgo(out *eiGenWriter, eiMetadata *EIMetadata)
- func WriteWasmer2Cgo(out *eiGenWriter, eiMetadata *EIMetadata)
- func WriteWasmer2OpcodeCost(out *eiGenWriter)
- type EIFunction
- type EIFunctionArg
- type EIFunctionResult
- type EIGroup
- type EIMetadata
- type EIType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEIGenWriter ¶
func ReadAndParseEIMetadata ¶
func ReadAndParseEIMetadata(fset *token.FileSet, pathToSources string, eiMetadata *EIMetadata) error
ReadAndParseEIMetadata will read and parse EI metadata
func WriteEIInterface ¶
func WriteEIInterface(out *eiGenWriter, eiMetadata *EIMetadata)
func WriteExecutorOpcodeCost ¶
func WriteExecutorOpcodeCost(out *eiGenWriter)
WriteExecutorOpcodeCost generates code for executor/gasCostWASM.go
func WriteNames ¶
func WriteNames( out *eiGenWriter, packageName string, eiMetadata *EIMetadata, )
func WriteOpcodeCostFuncHelpers ¶
func WriteOpcodeCostFuncHelpers(out *eiGenWriter)
WriteOpcodeCostFuncHelpers generates code for extractOpcodeCost.txt (to be copied manually in wasmer2/wasmer2Executor.go)
func WriteRustCapiVMHooks ¶
func WriteRustCapiVMHooks(out *eiGenWriter, eiMetadata *EIMetadata)
func WriteRustCapiVMHooksPointers ¶
func WriteRustCapiVMHooksPointers(out *eiGenWriter, eiMetadata *EIMetadata)
func WriteRustHookNames ¶
func WriteRustHookNames( out *eiGenWriter, eiMetadata *EIMetadata, )
func WriteRustOpcodeCost ¶
func WriteRustOpcodeCost(out *eiGenWriter)
WriteRustOpcodeCost generates code for opcode_cost.rs
func WriteRustVMHooksTrait ¶
func WriteRustVMHooksTrait(out *eiGenWriter, eiMetadata *EIMetadata)
WriteRustVMHooksTrait autogenerate data in the provided file
func WriteRustWasmerImports ¶
func WriteRustWasmerImports(out *eiGenWriter, eiMetadata *EIMetadata)
WriteRustWasmerImports autogenerate data in the provided file
func WriteRustWasmerMeteringHelpers ¶
func WriteRustWasmerMeteringHelpers(out *eiGenWriter)
WriteRustWasmerMeteringHelpers generates code for wasmer_metering_helpers.rs
func WriteVMHooksWrapper ¶
func WriteVMHooksWrapper(out *eiGenWriter, eiMetadata *EIMetadata)
func WriteWASMOpcodeCostConfigHelpers ¶
func WriteWASMOpcodeCostConfigHelpers(out *eiGenWriter)
WriteWASMOpcodeCostConfigHelpers generates code for config.txt (to be copied manually in config/config.toml)
func WriteWASMOpcodeCostFuncHelpers ¶
func WriteWASMOpcodeCostFuncHelpers(out *eiGenWriter)
WriteWASMOpcodeCostHelpers generates code for FillGasMap_WASMOpcodeCosts.txt (to be copied manually in config/gasSchedule.go)
func WriteWasmer1Cgo ¶
func WriteWasmer1Cgo(out *eiGenWriter, eiMetadata *EIMetadata)
WriteWasmer1Cgo writes the metadata in the provided file
func WriteWasmer2Cgo ¶
func WriteWasmer2Cgo(out *eiGenWriter, eiMetadata *EIMetadata)
WriteWasmer2Cgo writes the metadata in the provided file
func WriteWasmer2OpcodeCost ¶
func WriteWasmer2OpcodeCost(out *eiGenWriter)
WriteWasmer2OpcodeCost generates code for wasmer2/opcodeCost.go
Types ¶
type EIFunction ¶
type EIFunction struct { Name string Arguments []*EIFunctionArg Result *EIFunctionResult }
EIFunction holds data about one function in the VM EI.
type EIFunctionArg ¶
EIFunctionArg models an executor callback method arg.
type EIFunctionResult ¶
type EIFunctionResult struct {
Type EIType
}
EIFunctionResult models the executor callback method result.
type EIGroup ¶
type EIGroup struct { SourcePath string Name string Functions []*EIFunction }
EIGroup groups EI functions into bundles. They can end up in separate interfaces or files, if desired.
type EIMetadata ¶
type EIMetadata struct { Groups []*EIGroup AllFunctions []*EIFunction }
EIMetadata holds all data about EI functions in the VM.
Source Files ¶
- eiGenModel.go
- eiGenParse.go
- eiGenWriteCgo.go
- eiGenWriteGoNames.go
- eiGenWriteGoVMHooks.go
- eiGenWriteHeaders.go
- eiGenWriteOpcodeCost.go
- eiGenWriteOpcodeCostFuncHelpers.go
- eiGenWriteRustCapiVMHooks.go
- eiGenWriteRustCapiVMHooksPointers.go
- eiGenWriteRustOpcodeCost.go
- eiGenWriteRustUtil.go
- eiGenWriteRustVMHooksNames.go
- eiGenWriteRustVMHooksTrait.go
- eiGenWriteRustWasmerImports.go
- eiGenWriteRustWasmerMeteringHelpers.go
- eiGenWriteVMHooksWrapper.go
- eiGenWriteWASMOpcodeCost.go
- eiGenWriteWASMOpcodeCostConfigHelpers.go
- eiGenWriteWASMOpcodeCostFuncHelpers.go
- eiGenWriter.go
- stringUtil.go