Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In Wasmtime 3,
Trap
is now only an Enum (just likeTrapCode
was).See bytecodealliance/wasmtime#5149
I've adjusted the Ruby bindings to match that change:
Trap
, removing theTrapCode
module.
Trap#trap_code
toTrap#trap
.Trap#message
exclude the Wasm backtrace by default, andinstead added a
wasm_backtrace_message
method for that.I chose this name so we can still implement
wasm_backtrace
thatreturns an Enumerable of traces, if we ever have the need.
This is probably fine for now. In the spirit of matching Wasmtime
closely, I wonder if we should instead have a single error type
(
Wasmtime::Error
) and definetrap_code
andwasm_backtrace
on it.We can take that on later. I suggest merging this as it's a smaller
diff and still gets us on Wasmtime 3.