Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bytecodealliance/wasmtime-go
/ functions
Functions
436 in github.com/bytecodealliance/wasmtime-go
⨍
Functions
436
◇
Types & classes
58
↓ 82 callers
Method
Call
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 callers
Function
NewEngine
NewEngine creates a new `Engine` with default configuration.
engine.go:18
↓ 56 callers
Method
Type
Type returns the type of this func
func.go:328
↓ 54 callers
Function
NewStore
NewStore creates a new `Store` from the configuration provided in `engine`
store.go:70
↓ 50 callers
Method
Error
()
trap.go:115
↓ 48 callers
Method
Kind
Kind returns the kind of value that this `Val` contains.
val.go:98
↓ 41 callers
Function
NewConfig
NewConfig creates a new `Config` with all default options configured.
config.go:51
↓ 38 callers
Method
Close
Close will deallocate this type's state explicitly. For more information see the documentation for engine.Close()
trap.go:84
↓ 38 callers
Function
NewValType
NewValType creates a new `ValType` with the `kind` provided
valtype.go:51
↓ 36 callers
Method
Context
Returns the wasmtime context pointer this store is attached to.
store.go:32
↓ 36 callers
Function
mkError
(ptr *C.wasmtime_error_t)
error.go:11
↓ 34 callers
Function
Wat2Wasm
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 callers
Method
ptr
See comments in `ffi.go` for what's going on here
config.go:201
↓ 32 callers
Function
WrapFunc
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 callers
Function
NewModule
NewModule compiles a new `Module` from the `wasm` provided with the given configuration in `engine`.
module_feat_cranelift.go:13
↓ 29 callers
Method
GetFunc
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 callers
Function
maybeGC
See `ffi.go` documentation about `ptr()` for what's going on here.
maybe_gc_no.go:8
↓ 20 callers
Function
NewFuncType
NewFuncType creates a new `FuncType` with the `kind` provided
functype.go:18
↓ 19 callers
Method
ptr
()
linker.go:28
↓ 18 callers
Method
Instantiate
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 callers
Method
MemoryType
MemoryType returns the underlying `MemoryType` for this `ExternType` if it's a *memory* type. Otherwise returns `nil`.
externtype.go:88
↓ 16 callers
Function
NewInstance
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 callers
Method
Params
Params returns the parameter types of this function type
functype.go:78
↓ 16 callers
Method
ptr
()
trap.go:72
↓ 15 callers
Method
Get
Get returns the underlying 64-bit float if this is an `f64`, or panics.
val.go:157
↓ 15 callers
Function
newComponentEngine
newComponentEngine returns an Engine with the component-model proposal enabled, which is required to compile and instantiate components.
component_test.go:18
↓ 14 callers
Method
Name
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 callers
Function
newComponent
newComponent compiles `wat` into a fresh [Component] for tests. The returned component must be closed by the caller.
component_test.go:26
↓ 13 callers
Function
ValExternref
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 callers
Method
initialize
(store Storelike, ptr *C.wasmtime_val_t)
val.go:161
↓ 12 callers
Method
FuncType
FuncType returns the underlying `FuncType` for this `ExternType` if it's a function type. Otherwise returns `nil`.
externtype.go:58
↓ 12 callers
Method
Get
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 callers
Function
NewLinker
(engine *Engine)
linker.go:19
↓ 11 callers
Method
Results
Results returns the result types of this function type
functype.go:84
↓ 11 callers
Method
ptr
()
wasi.go:25
↓ 10 callers
Method
Define
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 callers
Method
GlobalType
GlobalType returns the underlying `GlobalType` for this `ExternType` if it's a *global* type. Otherwise returns `nil`.
externtype.go:68
↓ 9 callers
Method
Minimum
Minimum returns the minimum size, in elements, of this table.
tabletype.go:79
↓ 9 callers
Function
NewFunc
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 callers
Method
TableType
TableType returns the underlying `TableType` for this `ExternType` if it's a *table* type. Otherwise returns `nil`.
externtype.go:78
↓ 9 callers
Function
ValFuncref
ValFuncref converts a Func to a funcref Val Note that `f` can be `nil` to represent a null `funcref`.
val.go:40
↓ 9 callers
Function
ValI32
ValI32 converts a go int32 to a i32 Val
val.go:18
↓ 8 callers
Function
NewEngineWithConfig
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 callers
Function
NewGlobalType
NewGlobalType creates a new `GlobalType` with the `kind` provided and whether it's `mutable` or not
globaltype.go:15
↓ 8 callers
Method
allocate
()
slab.go:8
↓ 8 callers
Method
ptr
()
component_type_feat_component_model.go:45
↓ 7 callers
Function
getDataInStore
Returns the underlying `*storeData` that this store references in Go, used for inserting functions or storing panic data.
store.go:152
↓ 7 callers
Function
mkExternType
(ptr *C.wasm_externtype_t, owner interface{})
externtype.go:18
↓ 7 callers
Method
ptr
()
component_feat_component_model.go:64
↓ 6 callers
Method
Content
Content returns the type of value stored in this global
globaltype.go:66
↓ 6 callers
Method
Element
Element returns the type of value stored in this table
tabletype.go:73
↓ 6 callers
Method
ExportNth
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 callers
Method
Func
Func returns a Func if this export is a function or nil otherwise
extern.go:58
↓ 6 callers
Method
FuncWrap
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 callers
Method
GC
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 callers
Method
Grow
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 callers
Method
Module
Module returns the name in the module this import type is importing
importtype.go:72
↓ 6 callers
Method
Set
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 callers
Method
Table
Table returns a Table if this export is a table or nil otherwise
extern.go:91
↓ 6 callers
Function
ValI64
ValI64 converts a go int64 to a i64 Val
val.go:23
↓ 6 callers
Method
ptr
()
extern.go:27
↓ 5 callers
Method
AsExternType
AsExternType converts this type to an instance of `ExternType`
globaltype.go:79
↓ 5 callers
Method
Context
Implementation of the `Storelike` interface
store.go:130
↓ 5 callers
Method
Maximum
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 callers
Method
Memory
Memory returns a Memory if this export is a memory or nil otherwise
extern.go:80
↓ 5 callers
Function
NewGlobal
NewGlobal creates a new `Global` in the given `Store` with the specified `ty` and initial value `val`.
global.go:16
↓ 5 callers
Function
NewMemoryType
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 callers
Function
NewTrap
NewTrap creates a new `Trap` with the `name` and the type provided.
trap.go:58
↓ 5 callers
Method
Serialize
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 callers
Method
Set
Set sets the value of this global
global.go:60
↓ 5 callers
Function
ValF32
ValF32 converts a go float32 to a f32 Val
val.go:28
↓ 5 callers
Function
ValF64
ValF64 converts a go float64 to a f64 Val
val.go:33
↓ 5 callers
Method
deallocate
(slot int)
slab.go:17
↓ 5 callers
Function
mkFunc
(val C.wasmtime_func_t)
func.go:323
↓ 5 callers
Method
ptr
()
engine.go:67
↓ 5 callers
Method
ptr
()
tabletype.go:44
↓ 5 callers
Method
ptr
()
component_linker_feat_component_model.go:29
↓ 5 callers
Method
ptr
()
memorytype.go:66
↓ 5 callers
Method
ptr
()
module.go:27
↓ 5 callers
Method
ptr
()
trap.go:154
↓ 5 callers
Function
refTypesStore
()
reftypes_test.go:11
↓ 4 callers
Method
AsExternType
AsExternType converts this type to an instance of `ExternType`
tabletype.go:102
↓ 4 callers
Method
AsExternType
AsExternType converts this type to an instance of `ExternType`
functype.go:103
↓ 4 callers
Method
AsExternType
AsExternType converts this type to an instance of `ExternType`
memorytype.go:128
↓ 4 callers
Method
Close
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 callers
Method
Close
Close will deallocate this linker's state explicitly. For more information see the documentation for engine.Close()
linker.go:40
↓ 4 callers
Method
Data
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 callers
Method
Funcref
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 callers
Method
Get
Get gets the value of this global
global.go:52
↓ 4 callers
Method
GetExport
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 callers
Method
Global
Global returns a Global if this export is a global or nil otherwise
extern.go:69
↓ 4 callers
Method
I32
I32 returns the underlying 32-bit integer if this is an `i32`, or panics.
val.go:115
↓ 4 callers
Method
I64
I64 returns the underlying 64-bit integer if this is an `i64`, or panics.
val.go:123
↓ 4 callers
Method
Message
Message returns the message of the `Trap`
trap.go:94
↓ 4 callers
Function
NewStoreWithData
NewStoreWithData creates a new [Store] from engine and associates data with it. Embedders can access data via [Storelike.Data]
store.go:76
↓ 4 callers
Function
NewTableType
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 callers
Method
TypeAlias
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 callers
Function
check
(err error)
ci/test-minimal-runtime/create_cwasm.go:32
↓ 4 callers
Function
mkExtern
(ptr *C.wasmtime_extern_t)
extern.go:19
↓ 4 callers
Function
mkMemoryType
(ptr *C.wasm_memorytype_t, owner interface{})
memorytype.go:56
next →
1–100 of 436, ranked by callers