From d1258d932aaea6c6988ef514794152538e53821f Mon Sep 17 00:00:00 2001 From: MUsoftware Date: Wed, 15 Oct 2025 20:56:39 +0900 Subject: [PATCH] Add support for exceptions configuration --- tests/test_config.py | 1 + wasmtime/_config.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/tests/test_config.py b/tests/test_config.py index 5c387bf8..e1dea137 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -16,6 +16,7 @@ def test_smoke(self): config.wasm_multi_value = True config.wasm_multi_memory = True config.wasm_memory64 = True + config.wasm_exceptions = True config.cranelift_debug_verifier = True config.strategy = "cranelift" config.strategy = "auto" diff --git a/wasmtime/_config.py b/wasmtime/_config.py index 6e517f23..972066bc 100644 --- a/wasmtime/_config.py +++ b/wasmtime/_config.py @@ -160,6 +160,18 @@ def wasm_relaxed_simd_deterministic(self, enable: bool) -> None: raise TypeError('expected a bool') ffi.wasmtime_config_wasm_relaxed_simd_deterministic_set(self.ptr(), enable) + @setter_property + def wasm_exceptions(self, enable: bool) -> None: + """ + Configures whether the wasm [exceptions proposal] is enabled. + + [exceptions proposal]: https://github.com/WebAssembly/exception-handling + """ + + if not isinstance(enable, bool): + raise TypeError('expected a bool') + ffi.wasmtime_config_wasm_exceptions_set(self.ptr(), enable) + @setter_property def strategy(self, strategy: str) -> None: """