Wasmtime
component/func.h
Go to the documentation of this file.
1
2
3#ifndef WASMTIME_COMPONENT_FUNC_H
4#define WASMTIME_COMPONENT_FUNC_H
5
8#include <wasmtime/conf.h>
9#include <wasmtime/error.h>
10#include <wasmtime/store.h>
11
12#ifdef WASMTIME_FEATURE_COMPONENT_MODEL
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
26 struct {
28 uint64_t store_id;
30 uint32_t __private1;
31 };
32
34 uint32_t __private2;
36
41WASM_API_EXTERN wasmtime_component_func_type_t *
43 wasmtime_context_t *context);
44
57 const wasmtime_component_val_t *args, size_t args_size,
58 wasmtime_component_val_t *results, size_t results_size);
59
68WASM_API_EXTERN wasmtime_error_t *
70 wasmtime_context_t *context);
71
72#ifdef __cplusplus
73} // extern "C"
74#endif
75
76#endif // WASMTIME_FEATURE_COMPONENT_MODEL
77
78#endif // WASMTIME_COMPONENT_FUNC_H
WASM_API_EXTERN wasmtime_component_func_type_t * wasmtime_component_func_type(const wasmtime_component_func_t *func, wasmtime_context_t *context)
Returns the type of this function.
struct wasmtime_component_func wasmtime_component_func_t
Representation of a function in Wasmtime.
WASM_API_EXTERN wasmtime_error_t * wasmtime_component_func_post_return(const wasmtime_component_func_t *func, wasmtime_context_t *context)
Invokes the post-return canonical ABI option, if specified, after a wasmtime_component_func_call has ...
WASM_API_EXTERN wasmtime_error_t * wasmtime_component_func_call(const wasmtime_component_func_t *func, wasmtime_context_t *context, const wasmtime_component_val_t *args, size_t args_size, wasmtime_component_val_t *results, size_t results_size)
Invokes func with the args given and returns the result.
struct wasmtime_component_func_type_t wasmtime_component_func_type_t
Opaque type representing a component function type.
Definition: component/types/func.h:18
Build-time defines for how the C API was built.
Definition and accessors of wasmtime_error_t.
Representation of a function in Wasmtime.
Definition: component/func.h:25
uint32_t __private1
Private internal wasmtime information.
Definition: component/func.h:30
uint64_t store_id
Internal identifier of what store this belongs to, never zero.
Definition: component/func.h:28
uint32_t __private2
Private internal wasmtime information.
Definition: component/func.h:34
Represents possible runtime values which a component function can either consume or produce.
Definition: component/val.h:376
An interior pointer into a wasmtime_store_t which is used as "context" for many functions.
Errors generated by Wasmtime.