Skip to content
This repository was archived by the owner on Apr 16, 2025. It is now read-only.

Commit 7ad1984

Browse files
authored
Expose additional wasmtime configs. (#63)
1 parent 780eeba commit 7ad1984

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

include/wasmtime.hh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,27 @@ public:
346346
wasmtime_config_wasm_multi_value_set(ptr.get(), enable);
347347
}
348348

349+
/// \brief Configures whether the WebAssembly Garbage Collection proposal will be enabled
350+
///
351+
/// https://docs.wasmtime.dev/api/wasmtime/struct.Config.html#method.wasm_gc
352+
void wasm_gc(bool enable) {
353+
wasmtime_config_wasm_gc_set(ptr.get(), enable);
354+
}
355+
356+
/// \brief Configures whether the WebAssembly function references proposal will be enabled
357+
///
358+
/// https://docs.wasmtime.dev/api/wasmtime/struct.Config.html#method.wasm_function_references
359+
void wasm_function_references(bool enable) {
360+
wasmtime_config_wasm_function_references_set(ptr.get(), enable);
361+
}
362+
363+
/// \brief Configure whether wasmtime should compile a module using multiple threads.
364+
///
365+
/// https://docs.wasmtime.dev/api/wasmtime/struct.Config.html#method.parallel_compilation
366+
void parallel_compilation(bool enable) {
367+
wasmtime_config_parallel_compilation_set(ptr.get(), enable);
368+
}
369+
349370
/// \brief Configures compilation strategy for wasm code.
350371
///
351372
/// https://docs.wasmtime.dev/api/wasmtime/struct.Config.html#method.strategy

0 commit comments

Comments
 (0)