Skip to content

Update to wasmtime version with exceptions support#880

Merged
chrisdickinson merged 1 commit intoextism:mainfrom
bgmerrell:main
Oct 9, 2025
Merged

Update to wasmtime version with exceptions support#880
chrisdickinson merged 1 commit intoextism:mainfrom
bgmerrell:main

Conversation

@bgmerrell
Copy link
Copy Markdown
Contributor

@bgmerrell bgmerrell commented Oct 9, 2025

The wasmtime v37 release "now fully implements the WebAssembly exception-handling proposal." Support for exception-handling is disabled by default, but will be made default in the future (according to the release notes).

To use this new wasmtime feature, we do two things at a high level:

  1. Update wasmtime dependency to version 37
  2. Add a "wasmtime-exceptions" Extism feature, disabled by default.

Updating to the new wasmtime dependency required some semantical changes to how the cache is configured.

There is also a new ExternType to match on when handling invalid imports.

My use case for this feature is being able to execute Lua code from Extism. In actuality, I'm running a Rust plugin, which is using mlua to execute the Lua. I have it working locally with this change. Fwiw, mlua recently added support to compile to wasi, which should make this all work end-to-end with no special patches if we can get this merged.

This is my first time working on the Extism codebase, so please let me know if I missed anything.

The wasmtime v37 release[1] "now fully implements the WebAssembly
exception-handling proposal." Support for exception-handling is disabled
by default, but will be made default in the future (according to the
release notes).

To use this new wasmtime feature, we do two things at a high level:

	1. Update wasmtime dependency to version 37
	2. Add a "wasmtime-exceptions" Extism feature, disabled by
	   default.

Updating to the new wasmtime dependency required some semantical changes
to how the cache is configured.

There is also a new `ExternType` to match on when handling invalid
imports.

[1] https://github.com/bytecodealliance/wasmtime/releases/tag/v37.0.0
@bgmerrell bgmerrell marked this pull request as ready for review October 9, 2025 21:57
@nilslice
Copy link
Copy Markdown
Member

nilslice commented Oct 9, 2025

Thanks, @bgmerrell! We'll get this reviewed ASAP. Looks like CI passed, so we'll just do a quick round of tests and check integration with some of our other products. Appreciate your help here 👍

@bgmerrell bgmerrell changed the title Update wasmtime version with exceptions support Update to wasmtime version with exceptions support Oct 9, 2025
Copy link
Copy Markdown
Contributor

@chrisdickinson chrisdickinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@chrisdickinson
Copy link
Copy Markdown
Contributor

Going to merge to cut a dev build. As @nilslice mentioned, we'll test this in some of our services over the coming week, and once it looks good we can publish a new version. If you need the updates before we cut a new release on Crates, you can (temporarily) point at the git repo in the meantime!

@chrisdickinson chrisdickinson merged commit de81040 into extism:main Oct 9, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants