/// RUN[simple]: component wit --importize-world simple %
/// RUN[simple-rename]: component wit --importize-world simple-rename --importize-out-world-name test-rename %
/// RUN[simple-component]: component embed --dummy --world simple % | /
/// component wit --importize
/// RUN[with-deps]: component wit --importize-world with-deps %
/// RUN[simple-toplevel]: component wit --importize-world simple-toplevel %
/// RUN[toplevel-deps]: component wit --importize-world toplevel-deps %
/// FAIL[fail1]: component wit --importize-world fail1 %
/// RUN[trim-imports]: component wit --importize-world trim-imports %
/// RUN[tricky-import]: component wit --importize-world tricky-import %
package importize:importize;
interface t {
resource r;
}
interface bar {
use t.{r};
record foo {
x: string,
}
importize: func(name: r);
}
interface qux {
use bar.{foo};
blah: func(boo: foo);
}
interface something-else-dep {
type t = u32;
}
interface a {
}
interface b {
}
interface with-dep {
type t = u32;
}
world simple {
export t;
}
world simple-rename {
export t;
}
world simple-toplevel {
export foo: func();
export something: interface {
foo: func();
}
}
world toplevel-deps {
import something-else-dep;
type s = u32;
export bar: func() -> s;
export something-else: interface {
use something-else-dep.{t};
bar: func() -> t;
}
}
world fail1 {
type foo = u32;
export foo: func() -> foo;
}
world trim-imports {
import a;
import bar: interface {
}
type t = u32;
import foo: func();
export b;
}
world tricky-import {
import with-dep;
use with-dep.{t};
export f: func() -> t;
}
world with-deps-importized {
import t;
import bar;
import qux;
}