Change the name of wit-bindgen's host implementation traits. (#5890)

* Change the name of wit-bindgen's host implementation traits.

Instead of naming the host implementation trait something like
`wasi_filesystem::WasiFilesystem`, name it `wasi_filesystem::Host`, and
avoid using the identifier `Host` in other places.

This fixes a collision when generating bindings for the current
wasi-clock API, which contains an interface `wall-clock` which contains
a type `wall-clock`, which created a naming collision on the name
`WallClock`.

* Update tests to use the new trait name.

* Fix one more.

* Add the new test interface to the simple-wasi world.
This commit is contained in:
Dan Gohman
2023-02-27 15:14:55 -08:00
committed by GitHub
parent f2dce812c3
commit c19b742d1c
5 changed files with 36 additions and 20 deletions

View File

@@ -97,7 +97,7 @@ mod one_import {
hit: bool,
}
impl foo::Foo for MyImports {
impl foo::Host for MyImports {
fn foo(&mut self) -> Result<()> {
self.hit = true;
Ok(())