Skip to content

Commit 55343f1

Browse files
authored
Add support for exceptions configuration (#296)
1 parent 5b7f138 commit 55343f1

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tests/test_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def test_smoke(self):
1616
config.wasm_multi_value = True
1717
config.wasm_multi_memory = True
1818
config.wasm_memory64 = True
19+
config.wasm_exceptions = True
1920
config.cranelift_debug_verifier = True
2021
config.strategy = "cranelift"
2122
config.strategy = "auto"

wasmtime/_config.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,18 @@ def wasm_relaxed_simd_deterministic(self, enable: bool) -> None:
160160
raise TypeError('expected a bool')
161161
ffi.wasmtime_config_wasm_relaxed_simd_deterministic_set(self.ptr(), enable)
162162

163+
@setter_property
164+
def wasm_exceptions(self, enable: bool) -> None:
165+
"""
166+
Configures whether the wasm [exceptions proposal] is enabled.
167+
168+
[exceptions proposal]: https://github.com/WebAssembly/exception-handling
169+
"""
170+
171+
if not isinstance(enable, bool):
172+
raise TypeError('expected a bool')
173+
ffi.wasmtime_config_wasm_exceptions_set(self.ptr(), enable)
174+
163175
@setter_property
164176
def strategy(self, strategy: str) -> None:
165177
"""

0 commit comments

Comments
 (0)