Skip to content

Commit

Permalink
support configuring tail calls (#205)
Browse files Browse the repository at this point in the history
* support configuring tail calls

* Rebase conflicts

---------

Co-authored-by: Alex Crichton <[email protected]>
  • Loading branch information
womeier and alexcrichton authored Feb 21, 2024
1 parent 536b146 commit 2c26bf8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def test_smoke(self):
config = Config()
config.debug_info = True
config.wasm_threads = True
config.wasm_tail_call = True
config.wasm_reference_types = True
config.wasm_simd = True
config.wasm_bulk_memory = True
Expand Down
12 changes: 12 additions & 0 deletions wasmtime/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ def wasm_threads(self, enable: bool) -> None:
raise TypeError('expected a bool')
ffi.wasmtime_config_wasm_threads_set(self.ptr(), enable)

@setter_property
def wasm_tail_call(self, enable: bool) -> None:
"""
Configures whether the wasm [tail call proposal] is enabled.
[tail call proposal]: https://github.com/WebAssembly/tail-call
"""

if not isinstance(enable, bool):
raise TypeError('expected a bool')
ffi.wasmtime_config_wasm_tail_call_set(self.ptr(), enable)

@setter_property
def wasm_reference_types(self, enable: bool) -> None:
"""
Expand Down

0 comments on commit 2c26bf8

Please sign in to comment.