You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update traits generated for Rust exports
This commit updates the traits generated for Rust exports to be
uniformly named `Guest` as opposed to their previous names which were
based on the name of the interface or world. This reduces some
repetition (e.g. no `foo::Foo`) and additionally enables a nicer fix to
the problem of:
interface foo {
record foo {
foo: u32,
}
}
where previously the `struct Foo` generated would clash with `trait
Foo`. Now all types named "guest" are renamed to "Guest_" in Rust and
the `Guest` name is reserved for the generated trait.
This additionally renames resource-related traits to `GuestFoo` in a
similar manner to Wasmtime's bindgen using `HostFoo`.
Also along the lines of namespacing I've renamed `Rep{Foo}` for
resources to just `{Foo}` since the name is now available with the
traits being named `Guest{Foo}`.
This PR still has conflicts where if you have for example:
interface foo {
resource foo {
}
type guest-foo = u32
}
that generates an error, but that's getting more niche that I'd prefer
to fix that some other time. (Wasmtime's host bindgen has these same
issues as well)
Closes#650
* Ignore a broken test for java
0 commit comments