Wasmtime
module.h
Go to the documentation of this file.
1
7#ifndef WASMTIME_MODULE_H
8#define WASMTIME_MODULE_H
9
10#include <wasm.h>
11#include <wasmtime/error.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
29
45 wasm_engine_t *engine,
46 const uint8_t *wasm,
47 size_t wasm_len,
49);
50
55
61
65WASM_API_EXTERN void wasmtime_module_imports(
66 const wasmtime_module_t *module,
68);
69
73WASM_API_EXTERN void wasmtime_module_exports(
74 const wasmtime_module_t *module,
76);
77
91 wasm_engine_t *engine,
92 const uint8_t *wasm,
93 size_t wasm_len
94);
95
110 wasmtime_module_t* module,
111 wasm_byte_vec_t *ret
112);
113
125 wasm_engine_t *engine,
126 const uint8_t *bytes,
127 size_t bytes_len,
129);
130
146 wasm_engine_t *engine,
147 const char *path,
149);
150
151#ifdef __cplusplus
152} // extern "C"
153#endif
154
155#endif // WASMTIME_MODULE_H
Definition and accessors of wasmtime_error_t.
wasmtime_error_t * wasmtime_module_serialize(wasmtime_module_t *module, wasm_byte_vec_t *ret)
This function serializes compiled module artifacts as blob data.
void wasmtime_module_imports(const wasmtime_module_t *module, wasm_importtype_vec_t *out)
Same as wasm_module_imports, but for wasmtime_module_t.
wasmtime_error_t * wasmtime_module_deserialize(wasm_engine_t *engine, const uint8_t *bytes, size_t bytes_len, wasmtime_module_t **ret)
Build a module from serialized data.
wasmtime_module_t * wasmtime_module_clone(wasmtime_module_t *m)
Creates a shallow clone of the specified module, increasing the internal reference count.
wasmtime_error_t * wasmtime_module_deserialize_file(wasm_engine_t *engine, const char *path, wasmtime_module_t **ret)
Deserialize a module from an on-disk file.
wasmtime_error_t * wasmtime_module_validate(wasm_engine_t *engine, const uint8_t *wasm, size_t wasm_len)
Validate a WebAssembly binary.
wasmtime_error_t * wasmtime_module_new(wasm_engine_t *engine, const uint8_t *wasm, size_t wasm_len, wasmtime_module_t **ret)
Compiles a WebAssembly binary into a wasmtime_module_t.
void wasmtime_module_exports(const wasmtime_module_t *module, wasm_exporttype_vec_t *out)
Same as wasm_module_exports, but for wasmtime_module_t.
void wasmtime_module_delete(wasmtime_module_t *m)
Deletes a module.
A list of bytes.
Definition: wasm.h:96
Compilation environment and configuration.
A list of wasm_exporttype_t values.
Definition: wasm.h:299
A list of wasm_importtype_t values.
Definition: wasm.h:287
Errors generated by Wasmtime.
A compiled Wasmtime module.