Stream: git-wasmtime

Topic: wasmtime / PR #8766 Change WASI trait impls back to being...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2024 at 22:01):

alexcrichton opened PR #8766 from alexcrichton:back-to-blankets to bytecodealliance:main:

This commit is a partial revert of #8609 to return wasmtime-wasi and wasmtime-wasi-http back to using blanket impls. The main change from before is to change the blanket impls to be in terms of a local newtype wrapper to avoid trait coherence issues. This is done because otherwise using the traits before required &mut dyn WasiView to exist but sometimes only a Foo<'a> is held which is not easy to get a &mut dyn ... view of. By changing to a blanket impl in terms of a newtype wrapper, WasiImpl, it's possible to call bindgen!-generated add_to_linker_get_host functions with a return value of WasiImpl<Foo<'a>> which enables hooking into all the generated bindings.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2024 at 22:01):

alexcrichton requested wasmtime-core-reviewers for a review on PR #8766.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2024 at 22:01):

alexcrichton requested elliottt for a review on PR #8766.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2024 at 22:17):

elliottt submitted PR review:

Seems reasonable to me!

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2024 at 22:41):

alexcrichton merged PR #8766.


Last updated: Nov 22 2024 at 16:03 UTC