Stream: git-wasmtime

Topic: wasmtime / PR #8501 Turn the `wasmtime-runtime` crate int...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2024 at 17:24):

fitzgen edited PR #8501.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2024 at 17:25):

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 in wasmtime and used as dynamic trait objects inside wasmtime-runtime. Merging them will allow us to remove these hacks.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2024 at 17:55):

fitzgen updated PR #8501.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2024 at 17:55):

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 in wasmtime and used as dynamic trait objects inside wasmtime-runtime. Merging them will allow us to remove these hacks.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2024 at 18:07):

fitzgen updated PR #8501.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2024 at 18:27):

fitzgen updated PR #8501.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2024 at 18:50):

fitzgen updated PR #8501.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2024 at 19:10):

fitzgen updated PR #8501.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2024 at 19:25):

fitzgen updated PR #8501.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 29 2024 at 19:43):

fitzgen edited PR #8501.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 30 2024 at 17:17):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 30 2024 at 18:31):

fitzgen updated PR #8501.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 30 2024 at 18:31):

fitzgen has enabled auto merge for PR #8501.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 30 2024 at 19:15):

fitzgen merged PR #8501.

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2024 at 21:33):

kaimast commented on PR #8501:

How do I call wasmtime_runtime::raise_user_trap after this change?

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2024 at 21:58):

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

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2024 at 22:02):

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 an Err(..) from the host call.

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2024 at 22:47):

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!

view this post on Zulip Wasmtime GitHub notifications bot (May 21 2024 at 15:10):

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: Dec 23 2024 at 12:05 UTC