Stream: git-wasmtime

Topic: wasmtime / PR #3393 Add ResourceLimiterAsync, which can y...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2021 at 23:43):

pchickey edited PR #3393 from pch/async_limiting to main.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2021 at 23:46):

pchickey updated PR #3393 from pch/async_limiting to main.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2021 at 23:52):

pchickey edited PR #3393 from pch/async_limiting to main:

This PR:

I had to restructure a fair bit of the interface between runtime and wasmtime for this PR, including extending the wasmtime_runtime::Store trait, and changing the error type passed between them to anyhow::Error instead of Box<dyn std::error::Error + Send + Sync>.

Additionally, both ResourceLimiters are now safer: wasmtime_runtime now catches any panics that occur from the user's impl of the traits.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2021 at 23:52):

pchickey has marked PR #3393 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2021 at 23:55):

pchickey edited PR #3393 from pch/async_limiting to main:

This PR:

I had to restructure a fair bit of the interface between runtime and wasmtime for this PR, including extending the wasmtime_runtime::Store trait, and changing the error type passed between them to anyhow::Error instead of Box<dyn std::error::Error + Send + Sync>.

Additionally, both ResourceLimiters are now safer: wasmtime_runtime now catches any panics that occur from the user's impl of the traits.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2021 at 23:56):

pchickey edited PR #3393 from pch/async_limiting to main:

This PR:

I had to restructure a fair bit of the interface between runtime and wasmtime for this PR, including extending the wasmtime_runtime::Store trait, and changing the error type passed between them to anyhow::Error instead of Box<dyn std::error::Error + Send + Sync>.

Additionally, both ResourceLimiters are now safer: wasmtime_runtime now catches any panics that occur from the user's impl of the traits.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2021 at 23:57):

pchickey edited PR #3393 from pch/async_limiting to main:

This PR:

I had to restructure a fair bit of the interface between runtime and wasmtime for this PR, including extending the wasmtime_runtime::Store trait, and changing the error type passed between them to anyhow::Error instead of Box<dyn std::error::Error + Send + Sync>.

Additionally, both ResourceLimiters are now safer: wasmtime_runtime now catches any panics that occur from the user's impl of the traits.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 14:52):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 14:52):

alexcrichton created PR review comment:

I'd be a little uneasy actually using setjmp to sail past a catch_unwind frame, so could this be transmitted through the return value and outside of this closure the raise_user_trap happens?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 14:52):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 14:52):

alexcrichton created PR review comment:

I think the indentation here may be a bit off?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 14:52):

alexcrichton created PR review comment:

Could this and the panic test below be updated to grow through wasm? I think that's the more interesting path to test b/c otherwise there's already only Rust code on the stack which didn't necessitate adding a catch_unwind or anything like that.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 15:56):

pchickey updated PR #3393 from pch/async_limiting to main.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 17:42):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 17:42):

pchickey created PR review comment:

I didn't think of that, thanks! Easy fix

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 17:43):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 17:43):

pchickey created PR review comment:

Ah yeah rustfmt gave up because its in a macro.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 17:43):

pchickey updated PR #3393 from pch/async_limiting to main.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 18:08):

pchickey updated PR #3393 from pch/async_limiting to main.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 18:08):

pchickey requested alexcrichton for a review on PR #3393.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 18:45):

pchickey updated PR #3393 from pch/async_limiting to main.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 19:01):

pchickey updated PR #3393 from pch/async_limiting to main.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 20:43):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 21:03):

pchickey updated PR #3393 from pch/async_limiting to main.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2021 at 23:24):

pchickey updated PR #3393 from pch/async_limiting to main.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 25 2021 at 17:04):

pchickey updated PR #3393 from pch/async_limiting to main.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 25 2021 at 18:29):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 25 2021 at 18:47):

pchickey merged PR #3393.


Last updated: Nov 22 2024 at 16:03 UTC