forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change WASI trait impls back to being blanket impls
This commit is a partial revert of bytecodealliance#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.
- Loading branch information
1 parent
af59c4d
commit 60374e2
Showing
24 changed files
with
473 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.