fitzgen edited PR #8501.
fitzgen edited PR #8501:
We want to merge them together because there is no abstraction or layering or boundary between them in practice, but our architectures and designs have, at times, been constrained by this artificial crate boundary and what is visible in which crate and this has forced us to use nasty workarounds like defining traits in
wasmtime-runtime
that get implemented inwasmtime
and used as dynamic trait objects insidewasmtime-runtime
. Merging them will allow us to remove these hacks.
fitzgen updated PR #8501.
fitzgen edited PR #8501:
We want to merge them together because there is no abstraction or layering or boundary between them in practice, and our architectures and designs have, at times, been constrained by this artificial crate boundary and what is visible in which crate and this has forced us to use nasty workarounds like defining traits in
wasmtime-runtime
that get implemented inwasmtime
and used as dynamic trait objects insidewasmtime-runtime
. Merging them will allow us to remove these hacks.
fitzgen updated PR #8501.
fitzgen updated PR #8501.
fitzgen updated PR #8501.
fitzgen updated PR #8501.
fitzgen updated PR #8501.
fitzgen edited PR #8501.
alexcrichton submitted PR review.
fitzgen updated PR #8501.
fitzgen has enabled auto merge for PR #8501.
fitzgen merged PR #8501.
kaimast commented on PR #8501:
How do I call
wasmtime_runtime::raise_user_trap
after this change?
alexcrichton commented on PR #8501:
Ah it's no longer possible to call the function after this change as it's private to the
wasmtime
crate. Could you detail what you were doing with the function? We can try to help out to find a workaround perhaps
fitzgen commented on PR #8501:
Adding to what Alex said: that function was never intended to be exposed to or used by Wasmtime embedders. The
wasmtime-runtime
crate was an implementation detail of Wasmtime itself. Generally, to raise a trap in Wasm from a host API, you want to return anErr(..)
from the host call.
kaimast commented on PR #8501:
Generally, to raise a trap in Wasm from a host API, you want to return an
Err(..)
from the host call.Oh, I did not realize that is possible. I fairly recently ported my code over from Wasmer, so I am not super familiar with API yet. That is indeed a nicer way of doing it...
Thanks for the quick responses!
fitzgen commented on PR #8501:
@kaimast no problem! Feel free to pop into our Zulip or file an issue if you have any more questions.
Last updated: Nov 22 2024 at 17:03 UTC