MCPcopy Create free account

hub / github.com/bytecodealliance/wasmtime-go / functions

Functions436 in github.com/bytecodealliance/wasmtime-go

↓ 82 callersMethodCall
Call invokes this function with the provided `args`. This variadic function must be invoked with the correct number and type of `args` as specified b
func.go:367
↓ 58 callersFunctionNewEngine
NewEngine creates a new `Engine` with default configuration.
engine.go:18
↓ 56 callersMethodType
Type returns the type of this func
func.go:328
↓ 54 callersFunctionNewStore
NewStore creates a new `Store` from the configuration provided in `engine`
store.go:70
↓ 50 callersMethodError
()
trap.go:115
↓ 48 callersMethodKind
Kind returns the kind of value that this `Val` contains.
val.go:98
↓ 41 callersFunctionNewConfig
NewConfig creates a new `Config` with all default options configured.
config.go:51
↓ 38 callersMethodClose
Close will deallocate this type's state explicitly. For more information see the documentation for engine.Close()
trap.go:84
↓ 38 callersFunctionNewValType
NewValType creates a new `ValType` with the `kind` provided
valtype.go:51
↓ 36 callersMethodContext
Returns the wasmtime context pointer this store is attached to.
store.go:32
↓ 36 callersFunctionmkError
(ptr *C.wasmtime_error_t)
error.go:11
↓ 34 callersFunctionWat2Wasm
Wat2Wasm converts the text format of WebAssembly to the binary format. Takes the text format in-memory as input, and returns either the binary encodi
wat2wasm.go:14
↓ 34 callersMethodptr
See comments in `ffi.go` for what's going on here
config.go:201
↓ 32 callersFunctionWrapFunc
WrapFunc wraps a native Go function, `f`, as a wasm `Func`. This function differs from `NewFunc` in that it will determine the type signature of the
func.go:164
↓ 31 callersFunctionNewModule
NewModule compiles a new `Module` from the `wasm` provided with the given configuration in `engine`.
module_feat_cranelift.go:13
↓ 29 callersMethodGetFunc
GetFunc attempts to find a function on this instance by `name`. May return `nil` if this instance has no function named `name`, it is not a function,
instance.go:113
↓ 25 callersFunctionmaybeGC
See `ffi.go` documentation about `ptr()` for what's going on here.
maybe_gc_no.go:8
↓ 20 callersFunctionNewFuncType
NewFuncType creates a new `FuncType` with the `kind` provided
functype.go:18
↓ 19 callersMethodptr
()
linker.go:28
↓ 18 callersMethodInstantiate
Instantiate instantiates a module with all imports defined in this linker. Returns an error if the instance's imports couldn't be satisfied, had the
linker.go:242
↓ 16 callersMethodMemoryType
MemoryType returns the underlying `MemoryType` for this `ExternType` if it's a *memory* type. Otherwise returns `nil`.
externtype.go:88
↓ 16 callersFunctionNewInstance
NewInstance instantiates a WebAssembly `module` with the `imports` provided. This function will attempt to create a new wasm instance given the provi
instance.go:24
↓ 16 callersMethodParams
Params returns the parameter types of this function type
functype.go:78
↓ 16 callersMethodptr
()
trap.go:72
↓ 15 callersMethodGet
Get returns the underlying 64-bit float if this is an `f64`, or panics.
val.go:157
↓ 15 callersFunctionnewComponentEngine
newComponentEngine returns an Engine with the component-model proposal enabled, which is required to compile and instantiate components.
component_test.go:18
↓ 14 callersMethodName
Name returns the name in the module this import type is importing. Note that the returned string may be `nil` with the module linking proposal where
importtype.go:83
↓ 14 callersFunctionnewComponent
newComponent compiles `wat` into a fresh [Component] for tests. The returned component must be closed by the caller.
component_test.go:26
↓ 13 callersFunctionValExternref
ValExternref converts a go value to a externref Val Using `externref` is a way to pass arbitrary Go data into a WebAssembly module for it to store. L
val_feat_gc.go:49
↓ 13 callersMethodinitialize
(store Storelike, ptr *C.wasmtime_val_t)
val.go:161
↓ 12 callersMethodFuncType
FuncType returns the underlying `FuncType` for this `ExternType` if it's a function type. Otherwise returns `nil`.
externtype.go:58
↓ 12 callersMethodGet
Get gets an item from this table from the specified index. Returns an error if the index is out of bounds, or returns a value (which may be internall
table.go:73
↓ 12 callersFunctionNewLinker
(engine *Engine)
linker.go:19
↓ 11 callersMethodResults
Results returns the result types of this function type
functype.go:84
↓ 11 callersMethodptr
()
wasi.go:25
↓ 10 callersMethodDefine
Define defines a new item in this linker with the given module/name pair. Returns an error if shadowing is disallowed and the module/name is already d
linker.go:59
↓ 10 callersMethodGlobalType
GlobalType returns the underlying `GlobalType` for this `ExternType` if it's a *global* type. Otherwise returns `nil`.
externtype.go:68
↓ 9 callersMethodMinimum
Minimum returns the minimum size, in elements, of this table.
tabletype.go:79
↓ 9 callersFunctionNewFunc
NewFunc creates a new `Func` with the given `ty` which, when called, will call `f` The `ty` given is the wasm type signature of the `Func` to create.
func.go:50
↓ 9 callersMethodTableType
TableType returns the underlying `TableType` for this `ExternType` if it's a *table* type. Otherwise returns `nil`.
externtype.go:78
↓ 9 callersFunctionValFuncref
ValFuncref converts a Func to a funcref Val Note that `f` can be `nil` to represent a null `funcref`.
val.go:40
↓ 9 callersFunctionValI32
ValI32 converts a go int32 to a i32 Val
val.go:18
↓ 8 callersFunctionNewEngineWithConfig
NewEngineWithConfig creates a new `Engine` with the `Config` provided Note that once a `Config` is passed to this method it cannot be used again.
engine.go:29
↓ 8 callersFunctionNewGlobalType
NewGlobalType creates a new `GlobalType` with the `kind` provided and whether it's `mutable` or not
globaltype.go:15
↓ 8 callersMethodallocate
()
slab.go:8
↓ 8 callersMethodptr
()
component_type_feat_component_model.go:45
↓ 7 callersFunctiongetDataInStore
Returns the underlying `*storeData` that this store references in Go, used for inserting functions or storing panic data.
store.go:152
↓ 7 callersFunctionmkExternType
(ptr *C.wasm_externtype_t, owner interface{})
externtype.go:18
↓ 7 callersMethodptr
()
component_feat_component_model.go:64
↓ 6 callersMethodContent
Content returns the type of value stored in this global
globaltype.go:66
↓ 6 callersMethodElement
Element returns the type of value stored in this table
tabletype.go:73
↓ 6 callersMethodExportNth
ExportNth returns the name and the [ComponentItem] for the `i`-th export. Returns `("", nil)` if `i` is out of range.
component_type_feat_component_model.go:78
↓ 6 callersMethodFunc
Func returns a Func if this export is a function or nil otherwise
extern.go:58
↓ 6 callersMethodFuncWrap
FuncWrap defines a function in this linker in the same style as `WrapFunc` Note that this function does not require a `Storelike`, which is intention
linker.go:128
↓ 6 callersMethodGC
GC will clean up any `externref` values that are no longer actually referenced. This function is not required to be called for correctness, it's only
store_feat_gc.go:14
↓ 6 callersMethodGrow
Grow grows this table by the number of units specified, using the specified initializer value for new slots. Returns an error if the table failed to
table.go:54
↓ 6 callersMethodModule
Module returns the name in the module this import type is importing
importtype.go:72
↓ 6 callersMethodSet
Set sets an item in this table at the specified index. Returns an error if the index is out of bounds.
table.go:86
↓ 6 callersMethodTable
Table returns a Table if this export is a table or nil otherwise
extern.go:91
↓ 6 callersFunctionValI64
ValI64 converts a go int64 to a i64 Val
val.go:23
↓ 6 callersMethodptr
()
extern.go:27
↓ 5 callersMethodAsExternType
AsExternType converts this type to an instance of `ExternType`
globaltype.go:79
↓ 5 callersMethodContext
Implementation of the `Storelike` interface
store.go:130
↓ 5 callersMethodMaximum
Maximum returns the maximum size, in elements, of this table. If no maximum size is listed then `(false, 0)` is returned, otherwise `(true, N)` is re
tabletype.go:90
↓ 5 callersMethodMemory
Memory returns a Memory if this export is a memory or nil otherwise
extern.go:80
↓ 5 callersFunctionNewGlobal
NewGlobal creates a new `Global` in the given `Store` with the specified `ty` and initial value `val`.
global.go:16
↓ 5 callersFunctionNewMemoryType
NewMemoryType creates a new `MemoryType` with the limits on size provided The `min` value is the minimum size, in WebAssembly pages, of this memory.
memorytype.go:22
↓ 5 callersFunctionNewTrap
NewTrap creates a new `Trap` with the `name` and the type provided.
trap.go:58
↓ 5 callersMethodSerialize
Serialize will convert this in-memory compiled module into a list of bytes. The purpose of this method is to extract an artifact which can be stored
module_feat_cranelift.go:59
↓ 5 callersMethodSet
Set sets the value of this global
global.go:60
↓ 5 callersFunctionValF32
ValF32 converts a go float32 to a f32 Val
val.go:28
↓ 5 callersFunctionValF64
ValF64 converts a go float64 to a f64 Val
val.go:33
↓ 5 callersMethoddeallocate
(slot int)
slab.go:17
↓ 5 callersFunctionmkFunc
(val C.wasmtime_func_t)
func.go:323
↓ 5 callersMethodptr
()
engine.go:67
↓ 5 callersMethodptr
()
tabletype.go:44
↓ 5 callersMethodptr
()
component_linker_feat_component_model.go:29
↓ 5 callersMethodptr
()
memorytype.go:66
↓ 5 callersMethodptr
()
module.go:27
↓ 5 callersMethodptr
()
trap.go:154
↓ 5 callersFunctionrefTypesStore
()
reftypes_test.go:11
↓ 4 callersMethodAsExternType
AsExternType converts this type to an instance of `ExternType`
tabletype.go:102
↓ 4 callersMethodAsExternType
AsExternType converts this type to an instance of `ExternType`
functype.go:103
↓ 4 callersMethodAsExternType
AsExternType converts this type to an instance of `ExternType`
memorytype.go:128
↓ 4 callersMethodClose
Close will deallocate this engine's state explicitly. By default state is cleaned up automatically when an engine is garbage collected but the Go GC.
engine.go:57
↓ 4 callersMethodClose
Close will deallocate this linker's state explicitly. For more information see the documentation for engine.Close()
linker.go:40
↓ 4 callersMethodData
Arbitrary data attached to the store. Embedders should cast this into an appropriate domain specific type. Note that this will return nil for a [Store
store.go:38
↓ 4 callersMethodFuncref
Funcref returns the underlying function if this is a `funcref`, or panics. Note that a null `funcref` is returned as `nil`.
val.go:149
↓ 4 callersMethodGet
Get gets the value of this global
global.go:52
↓ 4 callersMethodGetExport
GetExport attempts to find an export on this instance by `name` May return `nil` if this instance has no export named `name`
instance.go:92
↓ 4 callersMethodGlobal
Global returns a Global if this export is a global or nil otherwise
extern.go:69
↓ 4 callersMethodI32
I32 returns the underlying 32-bit integer if this is an `i32`, or panics.
val.go:115
↓ 4 callersMethodI64
I64 returns the underlying 64-bit integer if this is an `i64`, or panics.
val.go:123
↓ 4 callersMethodMessage
Message returns the message of the `Trap`
trap.go:94
↓ 4 callersFunctionNewStoreWithData
NewStoreWithData creates a new [Store] from engine and associates data with it. Embedders can access data via [Storelike.Data]
store.go:76
↓ 4 callersFunctionNewTableType
NewTableType creates a new `TableType` with the `element` type provided as well as limits on its size. The `min` value is the minimum size, in elemen
tabletype.go:19
↓ 4 callersMethodTypeAlias
TypeAlias returns the [ComponentValType] embedded in this item when its kind is [ComponentItemKindType] (a WIT `type X = ...` alias). Returns `nil` fo
component_type_feat_component_model.go:163
↓ 4 callersFunctioncheck
(err error)
ci/test-minimal-runtime/create_cwasm.go:32
↓ 4 callersFunctionmkExtern
(ptr *C.wasmtime_extern_t)
extern.go:19
↓ 4 callersFunctionmkMemoryType
(ptr *C.wasm_memorytype_t, owner interface{})
memorytype.go:56
next →1–100 of 436, ranked by callers