Wasmtime
config.h
Go to the documentation of this file.
1
7#ifndef WASMTIME_CONFIG_H
8#define WASMTIME_CONFIG_H
9
10#include <wasm.h>
11#include <wasmtime/error.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
21typedef uint8_t wasmtime_strategy_t;
22
28enum wasmtime_strategy_enum { // Strategy
32
36};
37
43typedef uint8_t wasmtime_opt_level_t;
44
50enum wasmtime_opt_level_enum { // OptLevel
58};
59
66
72enum wasmtime_profiling_strategy_enum { // ProfilingStrategy
83};
84
85#define WASMTIME_CONFIG_PROP(ret, name, ty) \
86 WASM_API_EXTERN ret wasmtime_config_##name##_set(wasm_config_t*, ty);
87
97WASMTIME_CONFIG_PROP(void, debug_info, bool)
98
99
106WASMTIME_CONFIG_PROP(void, consume_fuel, bool)
107
122WASMTIME_CONFIG_PROP(void, epoch_interruption, bool)
123
137WASMTIME_CONFIG_PROP(void, max_wasm_stack, size_t)
138
146WASMTIME_CONFIG_PROP(void, wasm_threads, bool)
147
154WASMTIME_CONFIG_PROP(void, wasm_reference_types, bool)
155
162WASMTIME_CONFIG_PROP(void, wasm_simd, bool)
163
170WASMTIME_CONFIG_PROP(void, wasm_bulk_memory, bool)
171
178WASMTIME_CONFIG_PROP(void, wasm_multi_value, bool)
179
186WASMTIME_CONFIG_PROP(void, wasm_multi_memory, bool)
187
194WASMTIME_CONFIG_PROP(void, wasm_memory64, bool)
195
201WASMTIME_CONFIG_PROP(void, strategy, wasmtime_strategy_t)
202
211WASMTIME_CONFIG_PROP(void, cranelift_debug_verifier, bool)
212
224WASMTIME_CONFIG_PROP(void, cranelift_nan_canonicalization, bool)
225
231WASMTIME_CONFIG_PROP(void, cranelift_opt_level, wasmtime_opt_level_t)
232
238WASMTIME_CONFIG_PROP(void, profiler, wasmtime_profiling_strategy_t)
239
246WASMTIME_CONFIG_PROP(void, static_memory_maximum_size, uint64_t)
247
254WASMTIME_CONFIG_PROP(void, static_memory_guard_size, uint64_t)
255
262WASMTIME_CONFIG_PROP(void, dynamic_memory_guard_size, uint64_t)
263
277
278#ifdef __cplusplus
279} // extern "C"
280#endif
281
282#endif // WASMTIME_CONFIG_H
283
wasmtime_error_t * wasmtime_config_cache_config_load(wasm_config_t *, const char *)
Enables Wasmtime's cache and loads configuration from the specified path.
uint8_t wasmtime_strategy_t
Specifier for how Wasmtime will compile code, values are in wasmtime_strategy_enum.
Definition: config.h:21
uint8_t wasmtime_profiling_strategy_t
Different ways wasmtime can enable profiling JIT code.
Definition: config.h:65
wasmtime_profiling_strategy_enum
Different ways to profile JIT code.
Definition: config.h:72
@ WASMTIME_PROFILING_STRATEGY_VTUNE
Definition: config.h:82
@ WASMTIME_PROFILING_STRATEGY_NONE
No profiling is enabled at runtime.
Definition: config.h:74
@ WASMTIME_PROFILING_STRATEGY_JITDUMP
Definition: config.h:77
wasmtime_strategy_enum
Different ways that Wasmtime can compile WebAssembly.
Definition: config.h:28
@ WASMTIME_STRATEGY_CRANELIFT
Definition: config.h:35
@ WASMTIME_STRATEGY_AUTO
Definition: config.h:31
wasmtime_opt_level_enum
Different ways Wasmtime can optimize generated code.
Definition: config.h:50
@ WASMTIME_OPT_LEVEL_SPEED_AND_SIZE
Definition: config.h:57
@ WASMTIME_OPT_LEVEL_NONE
Generated code will not be optimized at all.
Definition: config.h:52
@ WASMTIME_OPT_LEVEL_SPEED
Generated code will be optimized purely for speed.
Definition: config.h:54
uint8_t wasmtime_opt_level_t
Specifier of what optimization level to use for generated JIT code.
Definition: config.h:43
Definition and accessors of wasmtime_error_t.
Global engine configuration.
Errors generated by Wasmtime.