Wasmtime
component/component.h
1#ifndef WASMTIME_COMPONENT_COMPONENT_H
2#define WASMTIME_COMPONENT_COMPONENT_H
3
4#include <wasm.h>
5#include <wasmtime/conf.h>
6#include <wasmtime/error.h>
7
8#ifdef WASMTIME_FEATURE_COMPONENT_MODEL
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
15typedef struct wasmtime_component_t wasmtime_component_t;
16
17#ifdef WASMTIME_FEATURE_COMPILER
18
39WASM_API_EXTERN wasmtime_error_t *
40wasmtime_component_new(const wasm_engine_t *engine, const uint8_t *buf,
41 size_t len, wasmtime_component_t **component_out);
42
56WASM_API_EXTERN wasmtime_error_t *
57wasmtime_component_serialize(const wasmtime_component_t *component,
58 wasm_byte_vec_t *ret);
59
60#endif // WASMTIME_FEATURE_COMPILER
61
72WASM_API_EXTERN wasmtime_error_t *
73wasmtime_component_deserialize(const wasm_engine_t *engine, const uint8_t *buf,
74 size_t len,
75 wasmtime_component_t **component_out);
76
91WASM_API_EXTERN wasmtime_error_t *
92wasmtime_component_deserialize_file(const wasm_engine_t *engine,
93 const char *path,
94 wasmtime_component_t **component_out);
95
100WASM_API_EXTERN wasmtime_component_t *
101wasmtime_component_clone(const wasmtime_component_t *component);
102
109WASM_API_EXTERN void wasmtime_component_delete(wasmtime_component_t *component);
110
111#ifdef __cplusplus
112} // extern "C"
113#endif
114
115#endif // WASMTIME_FEATURE_COMPONENT_MODEL
116
117#endif // WASMTIME_COMPONENT_COMPONENT_H
Build-time defines for how the C API was built.
Definition and accessors of wasmtime_error_t.
A list of bytes.
Definition: wasm.h:102
Compilation environment and configuration.
Errors generated by Wasmtime.