7#ifndef WASMTIME_CONFIG_H
8#define WASMTIME_CONFIG_H
90#define WASMTIME_CONFIG_PROP(ret, name, ty) \
91 WASM_API_EXTERN ret wasmtime_config_##name##_set(wasm_config_t *, ty);
102WASMTIME_CONFIG_PROP(
void, debug_info,
bool)
111WASMTIME_CONFIG_PROP(
void, consume_fuel,
bool)
127WASMTIME_CONFIG_PROP(
void, epoch_interruption,
bool)
142WASMTIME_CONFIG_PROP(
void, max_wasm_stack,
size_t)
144#ifdef WASMTIME_FEATURE_THREADS
153WASMTIME_CONFIG_PROP(
void, wasm_threads,
bool)
162WASMTIME_CONFIG_PROP(
void, wasm_tail_call,
bool)
170WASMTIME_CONFIG_PROP(
void, wasm_reference_types,
bool)
178WASMTIME_CONFIG_PROP(
void, wasm_function_references,
bool)
185WASMTIME_CONFIG_PROP(
void, wasm_gc,
bool)
193WASMTIME_CONFIG_PROP(
void, wasm_simd,
bool)
201WASMTIME_CONFIG_PROP(
void, wasm_relaxed_simd,
bool)
209WASMTIME_CONFIG_PROP(
void, wasm_relaxed_simd_deterministic,
bool)
217WASMTIME_CONFIG_PROP(
void, wasm_bulk_memory,
bool)
225WASMTIME_CONFIG_PROP(
void, wasm_multi_value,
bool)
233WASMTIME_CONFIG_PROP(
void, wasm_multi_memory,
bool)
241WASMTIME_CONFIG_PROP(
void, wasm_memory64,
bool)
249WASMTIME_CONFIG_PROP(
void, wasm_wide_arithmetic,
bool)
251#ifdef WASMTIME_FEATURE_COMPILER
262#ifdef WASMTIME_FEATURE_PARALLEL_COMPILATION
271WASMTIME_CONFIG_PROP(
void, parallel_compilation,
bool)
275#ifdef WASMTIME_FEATURE_COMPILER
285WASMTIME_CONFIG_PROP(
void, cranelift_debug_verifier,
bool)
300WASMTIME_CONFIG_PROP(
void, cranelift_nan_canonicalization,
bool)
327WASMTIME_CONFIG_PROP(
void, memory_may_move,
bool)
336WASMTIME_CONFIG_PROP(
void, memory_reservation, uint64_t)
344WASMTIME_CONFIG_PROP(
void, memory_guard_size, uint64_t)
353WASMTIME_CONFIG_PROP(
void, memory_reservation_for_growth, uint64_t)
364WASMTIME_CONFIG_PROP(
void, native_unwind_info,
bool)
366#ifdef WASMTIME_FEATURE_CACHE
385#ifdef WASMTIME_FEATURE_COMPILER
437WASMTIME_CONFIG_PROP(
void, macos_use_mach_ports,
bool)
449 size_t *byte_capacity);
474 void (*finalizer)(
void *);
490 size_t reserved_size_in_bytes,
size_t guard_size_in_bytes,
543WASMTIME_CONFIG_PROP(
void, memory_init_cow,
bool)
Build-time defines for how the C API was built.
void wasmtime_config_cranelift_flag_set(wasm_config_t *, const char *key, const char *value)
Sets a target-specific flag in Cranelift to the specified value.
wasmtime_error_t * wasmtime_config_cache_config_load(wasm_config_t *, const char *)
Enables Wasmtime's cache and loads configuration from the specified path.
struct wasmtime_memory_creator wasmtime_memory_creator_t
struct wasmtime_linear_memory wasmtime_linear_memory_t
uint8_t wasmtime_strategy_t
Specifier for how Wasmtime will compile code, values are in wasmtime_strategy_enum.
Definition: config.h:22
void wasmtime_config_cranelift_flag_enable(wasm_config_t *, const char *)
Enables a target-specific flag in Cranelift.
uint8_t wasmtime_profiling_strategy_t
Different ways wasmtime can enable profiling JIT code.
Definition: config.h:66
wasmtime_profiling_strategy_enum
Different ways to profile JIT code.
Definition: config.h:73
@ WASMTIME_PROFILING_STRATEGY_VTUNE
Definition: config.h:83
@ WASMTIME_PROFILING_STRATEGY_PERFMAP
Definition: config.h:87
@ WASMTIME_PROFILING_STRATEGY_NONE
No profiling is enabled at runtime.
Definition: config.h:75
@ WASMTIME_PROFILING_STRATEGY_JITDUMP
Definition: config.h:78
wasmtime_strategy_enum
Different ways that Wasmtime can compile WebAssembly.
Definition: config.h:29
@ WASMTIME_STRATEGY_CRANELIFT
Definition: config.h:36
@ WASMTIME_STRATEGY_AUTO
Definition: config.h:32
uint8_t *(* wasmtime_memory_get_callback_t)(void *env, size_t *byte_size, size_t *byte_capacity)
Definition: config.h:448
wasmtime_opt_level_enum
Different ways Wasmtime can optimize generated code.
Definition: config.h:51
@ WASMTIME_OPT_LEVEL_SPEED_AND_SIZE
Definition: config.h:58
@ WASMTIME_OPT_LEVEL_NONE
Generated code will not be optimized at all.
Definition: config.h:53
@ WASMTIME_OPT_LEVEL_SPEED
Generated code will be optimized purely for speed.
Definition: config.h:55
void wasmtime_config_host_memory_creator_set(wasm_config_t *, wasmtime_memory_creator_t *)
uint8_t wasmtime_opt_level_t
Specifier of what optimization level to use for generated JIT code.
Definition: config.h:44
wasmtime_error_t *(* wasmtime_new_memory_callback_t)(void *env, const wasm_memorytype_t *ty, size_t minimum, size_t maximum, size_t reserved_size_in_bytes, size_t guard_size_in_bytes, wasmtime_linear_memory_t *memory_ret)
Definition: config.h:488
wasmtime_error_t *(* wasmtime_memory_grow_callback_t)(void *env, size_t new_size)
Definition: config.h:457
Definition and accessors of wasmtime_error_t.
Global engine configuration.
An opaque object representing the type of a memory.
Errors generated by Wasmtime.
wasmtime_memory_get_callback_t get_memory
Callback to get the memory and size of this LinearMemory.
Definition: config.h:470
void * env
User provided value to be passed to get_memory and grow_memory.
Definition: config.h:468
wasmtime_memory_grow_callback_t grow_memory
Callback to request growing the memory.
Definition: config.h:472
void(* finalizer)(void *)
An optional finalizer for env.
Definition: config.h:506
wasmtime_new_memory_callback_t new_memory
The callback to create new memory, must be thread safe.
Definition: config.h:504
void * env
User provided value to be passed to new_memory.
Definition: config.h:502