chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (func (param "arg" string)))
(export (;0;) "log" (func (type 0)))
)
)
(export (;0;) "foo:console/console" (instance (type 0)))
)
)
(export (;1;) "console" (type 0))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,5 @@
package foo:console;
interface console {
log: func(arg: string);
}

View File

@@ -0,0 +1,6 @@
package foo:console;
interface console {
log: func(arg: string);
}

View File

@@ -0,0 +1,70 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) u8)
(export (;1;) "t1" (type (eq 0)))
)
)
(export (;0;) "foo:foo/shared1" (instance (type 0)))
)
)
(export (;1;) "shared1" (type 0))
(type (;2;)
(component
(type (;0;)
(instance
(type (;0;) u8)
(export (;1;) "t2" (type (eq 0)))
)
)
(export (;0;) "foo:foo/shared2" (instance (type 0)))
)
)
(export (;3;) "shared2" (type 2))
(type (;4;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) u8)
(export (;1;) "t1" (type (eq 0)))
)
)
(import "foo:foo/shared1" (instance (;0;) (type 0)))
(alias export 0 "t1" (type (;1;)))
(type (;2;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "t1" (type (eq 0)))
)
)
(import "foo" (instance (;1;) (type 2)))
(type (;3;)
(instance
(type (;0;) u8)
(export (;1;) "t2" (type (eq 0)))
)
)
(import "foo:foo/shared2" (instance (;2;) (type 3)))
(alias export 2 "t2" (type (;4;)))
(type (;5;)
(instance
(alias outer 1 4 (type (;0;)))
(export (;1;) "t2" (type (eq 0)))
)
)
(import "bar" (instance (;3;) (type 5)))
)
)
(export (;0;) "foo:foo/w1" (component (type 0)))
)
)
(export (;5;) "w1" (type 4))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,20 @@
package foo:foo;
interface shared1 {
type t1 = u8;
}
interface shared2 {
type t2 = u8;
}
world w1 {
import shared1;
import foo: interface {
use shared1.{t1};
}
import shared2;
import bar: interface {
use shared2.{t2};
}
}

View File

@@ -0,0 +1,10 @@
package foo:foo;
world w1 {
import foo: interface {
use shared1.{t1};
}
import bar: interface {
use shared2.{t2};
}
}

View File

@@ -0,0 +1,3 @@
interface shared1 {
type t1 = u8;
}

View File

@@ -0,0 +1,3 @@
interface shared2 {
type t2 = u8;
}

View File

@@ -0,0 +1,107 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (enum "a"))
(export (;1;) "the-enum" (type (eq 0)))
)
)
(export (;0;) "foo:foo/shared-items" (instance (type 0)))
)
)
(export (;1;) "shared-items" (type 0))
(type (;2;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (enum "a"))
(export (;1;) "the-enum" (type (eq 0)))
)
)
(import "foo:foo/shared-items" (instance (;0;) (type 0)))
(alias export 0 "the-enum" (type (;1;)))
(type (;2;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "the-enum" (type (eq 0)))
)
)
(import "foo" (instance (;1;) (type 2)))
(type (;3;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "the-enum" (type (eq 0)))
)
)
(import "bar" (instance (;2;) (type 3)))
)
)
(export (;0;) "foo:foo/w1" (component (type 0)))
)
)
(export (;3;) "w1" (type 2))
(type (;4;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (enum "a"))
(export (;1;) "the-enum" (type (eq 0)))
)
)
(import "foo:foo/shared-items" (instance (;0;) (type 0)))
(alias export 0 "the-enum" (type (;1;)))
(type (;2;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "the-enum" (type (eq 0)))
)
)
(import "foo" (instance (;1;) (type 2)))
(type (;3;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "the-enum" (type (eq 0)))
)
)
(export (;2;) "bar" (instance (type 3)))
)
)
(export (;0;) "foo:foo/w2" (component (type 0)))
)
)
(export (;5;) "w2" (type 4))
(type (;6;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (enum "a"))
(export (;1;) "the-enum" (type (eq 0)))
)
)
(import "foo:foo/shared-items" (instance (;0;) (type 0)))
(alias export 0 "the-enum" (type (;1;)))
(type (;2;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "the-enum" (type (eq 0)))
)
)
(export (;1;) "bar" (instance (type 2)))
)
)
(export (;0;) "foo:foo/w3" (component (type 0)))
)
)
(export (;7;) "w3" (type 6))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,31 @@
package foo:foo;
interface shared-items {
enum the-enum {
a
}
}
world w1 {
import foo: interface {
use shared-items.{the-enum};
}
import bar: interface {
use shared-items.{the-enum};
}
}
world w2 {
import foo: interface {
use shared-items.{the-enum};
}
export bar: interface {
use shared-items.{the-enum};
}
}
world w3 {
export bar: interface {
use shared-items.{the-enum};
}
}

View File

@@ -0,0 +1,34 @@
package foo:foo;
interface shared-items {
enum the-enum {
a,
}
}
world w1 {
import shared-items;
import foo: interface {
use shared-items.{the-enum};
}
import bar: interface {
use shared-items.{the-enum};
}
}
world w2 {
import shared-items;
import foo: interface {
use shared-items.{the-enum};
}
export bar: interface {
use shared-items.{the-enum};
}
}
world w3 {
import shared-items;
export bar: interface {
use shared-items.{the-enum};
}
}

View File

@@ -0,0 +1,73 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) u32)
(export (;1;) "t" (type (eq 0)))
(type (;2;) (record (field "f1" u8) (field "f2" u8)))
(export (;3;) "r" (type (eq 2)))
(type (;4;) (flags "f1" "f2"))
(export (;5;) "fl" (type (eq 4)))
(type (;6;) (variant (case "c1" u8) (case "c2")))
(export (;7;) "v" (type (eq 6)))
(type (;8;) (enum "c1" "c2"))
(export (;9;) "e" (type (eq 8)))
(export (;10;) "res" (type (sub resource)))
(type (;11;) (own 10))
(type (;12;) (func (result 11)))
(export (;0;) "[constructor]res" (func (type 12)))
(type (;13;) (borrow 10))
(type (;14;) (func (param "self" 13)))
(export (;1;) "[method]res.m" (func (type 14)))
(type (;15;) (func))
(export (;2;) "[static]res.s" (func (type 15)))
(export (;3;) "f" (func (type 15)))
)
)
(export (;0;) "foo:foo/coverage-iface" (instance (type 0)))
)
)
(export (;1;) "coverage-iface" (type 0))
(type (;2;)
(component
(type (;0;)
(instance
(type (;0;) (func))
(export (;0;) "multiple-lines-split" (func (type 0)))
(export (;1;) "mixed-forms" (func (type 0)))
)
)
(export (;0;) "foo:foo/other-comment-forms" (instance (type 0)))
)
)
(export (;3;) "other-comment-forms" (type 2))
(type (;4;)
(component
(type (;0;)
(component
(type (;0;) u32)
(import "t" (type (;1;) (eq 0)))
(type (;2;) (func))
(import "imp" (func (;0;) (type 2)))
(export (;1;) "exp" (func (type 2)))
(type (;3;)
(instance
(type (;0;) u32)
(export (;1;) "t" (type (eq 0)))
(type (;2;) (func))
(export (;0;) "f" (func (type 2)))
)
)
(export (;0;) "i" (instance (type 3)))
)
)
(export (;0;) "foo:foo/coverage-world" (component (type 0)))
)
)
(export (;5;) "coverage-world" (type 4))
(@custom "package-docs" "\01{\22docs\22:\22package docs;\22,\22worlds\22:{\22coverage-world\22:{\22docs\22:\22world docs\22,\22types\22:{\22t\22:{\22docs\22:\22world typedef docs\22}},\22funcs\22:{\22imp\22:{\22docs\22:\22world func import docs\22}},\22interface_exports\22:{\22i\22:{\22docs\22:\22world inline interface docs\22,\22funcs\22:{\22f\22:{\22docs\22:\22inline interface func docs\22}},\22types\22:{\22t\22:{\22docs\22:\22inline interface typedef docs\22}}}},\22func_exports\22:{\22exp\22:{\22docs\22:\22world func export docs\22}}}},\22interfaces\22:{\22coverage-iface\22:{\22docs\22:\22interface docs\22,\22funcs\22:{\22[constructor]res\22:{\22docs\22:\22constructor docs\22},\22[method]res.m\22:{\22docs\22:\22method docs\22},\22[static]res.s\22:{\22docs\22:\22static func docs\22},\22f\22:{\22docs\22:\22interface func docs\22}},\22types\22:{\22t\22:{\22docs\22:\22basic typedef docs\22},\22r\22:{\22docs\22:\22record typedef docs\22,\22items\22:{\22f1\22:\22record field docs\22}},\22fl\22:{\22items\22:{\22f1\22:\22flag docs\22}},\22v\22:{\22items\22:{\22c1\22:\22variant case docs\22}},\22e\22:{\22items\22:{\22c1\22:\22enum case docs\22}}}},\22other-comment-forms\22:{\22docs\22:\22other comment forms\5cn multi-line block\22,\22funcs\22:{\22multiple-lines-split\22:{\22docs\22:\22one doc line\5cnnon-doc in the middle\5cnanother doc line\22},\22mixed-forms\22:{\22docs\22:\22mixed forms; line doc\5cnplus block doc\5cn multi-line\22}}}}}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,79 @@
/// package docs;
package foo:foo;
/// interface docs
interface coverage-iface {
/// basic typedef docs
type t = u32;
/// record typedef docs
record r {
/// record field docs
f1: u8,
f2: u8,
}
flags fl {
/// flag docs
f1,
f2,
}
variant v {
/// variant case docs
c1(u8),
c2,
}
enum e {
/// enum case docs
c1,
c2,
}
resource res {
/// constructor docs
constructor();
/// method docs
m: func();
/// static func docs
s: static func();
}
/// interface func docs
f: func();
}
/// world docs
world coverage-world {
/// world func import docs
import imp: func();
/// world typedef docs
type t = u32;
/// world inline interface docs
export i: interface {
/// inline interface typedef docs
type t = u32;
/// inline interface func docs
f: func();
}
/// world func export docs
export exp: func();
}
/** other comment forms
multi-line block */
interface other-comment-forms {
/// one doc line
// non-doc in the middle
/// another doc line
multiple-lines-split: func();
/// mixed forms; line doc
/** plus block doc
multi-line */
mixed-forms: func();
}

View File

@@ -0,0 +1,78 @@
/// package docs;
package foo:foo;
/// interface docs
interface coverage-iface {
/// basic typedef docs
type t = u32;
/// record typedef docs
record r {
/// record field docs
f1: u8,
f2: u8,
}
flags fl {
/// flag docs
f1,
f2,
}
variant v {
/// variant case docs
c1(u8),
c2,
}
enum e {
/// enum case docs
c1,
c2,
}
resource res {
/// constructor docs
constructor();
/// method docs
m: func();
/// static func docs
s: static func();
}
/// interface func docs
f: func();
}
/// other comment forms
/// multi-line block
interface other-comment-forms {
/// one doc line
/// non-doc in the middle
/// another doc line
multiple-lines-split: func();
/// mixed forms; line doc
/// plus block doc
/// multi-line
mixed-forms: func();
}
/// world docs
world coverage-world {
/// world typedef docs
type t = u32;
/// world func import docs
import imp: func();
/// world func export docs
export exp: func();
/// world inline interface docs
export i: interface {
/// inline interface typedef docs
type t = u32;
/// inline interface func docs
f: func();
}
}

View File

@@ -0,0 +1,50 @@
(component
(type (;0;)
(component
(type (;0;)
(instance)
)
(export (;0;) "foo:empty/empty" (instance (type 0)))
)
)
(export (;1;) "empty" (type 0))
(type (;2;)
(component
(type (;0;)
(component
(type (;0;)
(instance)
)
(import "foo:empty/empty" (instance (;0;) (type 0)))
(type (;1;)
(instance)
)
(import "empty" (instance (;1;) (type 1)))
(type (;2;)
(instance)
)
(export (;2;) "foo:empty/empty" (instance (type 2)))
(type (;3;)
(instance)
)
(export (;3;) "empty2" (instance (type 3)))
)
)
(export (;0;) "foo:empty/empty-world" (component (type 0)))
)
)
(export (;3;) "empty-world" (type 2))
(type (;4;)
(component
(type (;0;)
(component)
)
(export (;0;) "foo:empty/actually-empty-world" (component (type 0)))
)
)
(export (;5;) "actually-empty-world" (type 4))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,12 @@
package foo:empty;
interface empty {}
world empty-world {
import empty;
import empty: interface {}
export empty;
export empty2: interface {}
}
world actually-empty-world {}

View File

@@ -0,0 +1,16 @@
package foo:empty;
interface empty {
}
world empty-world {
import empty;
import empty: interface {
}
export empty;
export empty2: interface {
}
}
world actually-empty-world {
}

View File

@@ -0,0 +1,23 @@
(component
(type (;0;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) u8)
(export (;1;) "t" (type (eq 0)))
)
)
(export (;0;) "foo:the-dep/the-interface" (instance (type 0)))
)
)
(export (;0;) "foo:foo/foo" (component (type 0)))
)
)
(export (;1;) "foo" (type 0))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,9 @@
package foo:the-dep;
interface the-interface {
type t = u8;
}
interface unused-interface {
type u = u32;
}

View File

@@ -0,0 +1,5 @@
package foo:foo;
world foo {
export foo:the-dep/the-interface;
}

View File

@@ -0,0 +1,5 @@
package foo:foo;
world foo {
export foo:the-dep/the-interface;
}

View File

@@ -0,0 +1,39 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (record (field "a" u32)))
(export (;1;) "my-struct" (type (eq 0)))
(type (;2;) (func (param "a" 1) (result string)))
(export (;0;) "my-function" (func (type 2)))
)
)
(export (;0;) "foo:foo/foo" (instance (type 0)))
)
)
(export (;1;) "foo" (type 0))
(type (;2;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (record (field "a" u32)))
(export (;1;) "my-struct" (type (eq 0)))
(type (;2;) (func (param "a" 1) (result string)))
(export (;0;) "my-function" (func (type 2)))
)
)
(export (;0;) "foo:foo/foo" (instance (type 0)))
)
)
(export (;0;) "foo:foo/export-foo" (component (type 0)))
)
)
(export (;3;) "export-foo" (type 2))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,13 @@
package foo:foo;
interface foo {
record my-struct {
a: u32,
}
my-function: func(a: my-struct) -> string;
}
world export-foo {
export foo;
}

View File

@@ -0,0 +1,13 @@
package foo:foo;
interface foo {
record my-struct {
a: u32,
}
my-function: func(a: my-struct) -> string;
}
world export-foo {
export foo;
}

View File

@@ -0,0 +1,79 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (flags "b0"))
(export (;1;) "flag1" (type (eq 0)))
(type (;2;) (flags "b0" "b1"))
(export (;3;) "flag2" (type (eq 2)))
(type (;4;) (flags "b0" "b1" "b2" "b3"))
(export (;5;) "flag4" (type (eq 4)))
(type (;6;) (flags "b0" "b1" "b2" "b3" "b4" "b5" "b6" "b7"))
(export (;7;) "flag8" (type (eq 6)))
(type (;8;) (flags "b0" "b1" "b2" "b3" "b4" "b5" "b6" "b7" "b8" "b9" "b10" "b11" "b12" "b13" "b14" "b15"))
(export (;9;) "flag16" (type (eq 8)))
(type (;10;) (flags "b0" "b1" "b2" "b3" "b4" "b5" "b6" "b7" "b8" "b9" "b10" "b11" "b12" "b13" "b14" "b15" "b16" "b17" "b18" "b19" "b20" "b21" "b22" "b23" "b24" "b25" "b26" "b27" "b28" "b29" "b30" "b31"))
(export (;11;) "flag32" (type (eq 10)))
(type (;12;) (func (param "x" 1) (result 1)))
(export (;0;) "roundtrip-flag1" (func (type 12)))
(type (;13;) (func (param "x" 3) (result 3)))
(export (;1;) "roundtrip-flag2" (func (type 13)))
(type (;14;) (func (param "x" 5) (result 5)))
(export (;2;) "roundtrip-flag4" (func (type 14)))
(type (;15;) (func (param "x" 7) (result 7)))
(export (;3;) "roundtrip-flag8" (func (type 15)))
(type (;16;) (func (param "x" 9) (result 9)))
(export (;4;) "roundtrip-flag16" (func (type 16)))
(type (;17;) (func (param "x" 11) (result 11)))
(export (;5;) "roundtrip-flag32" (func (type 17)))
)
)
(export (;0;) "foo:flags/imports" (instance (type 0)))
)
)
(export (;1;) "imports" (type 0))
(type (;2;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (flags "b0"))
(export (;1;) "flag1" (type (eq 0)))
(type (;2;) (flags "b0" "b1"))
(export (;3;) "flag2" (type (eq 2)))
(type (;4;) (flags "b0" "b1" "b2" "b3"))
(export (;5;) "flag4" (type (eq 4)))
(type (;6;) (flags "b0" "b1" "b2" "b3" "b4" "b5" "b6" "b7"))
(export (;7;) "flag8" (type (eq 6)))
(type (;8;) (flags "b0" "b1" "b2" "b3" "b4" "b5" "b6" "b7" "b8" "b9" "b10" "b11" "b12" "b13" "b14" "b15"))
(export (;9;) "flag16" (type (eq 8)))
(type (;10;) (flags "b0" "b1" "b2" "b3" "b4" "b5" "b6" "b7" "b8" "b9" "b10" "b11" "b12" "b13" "b14" "b15" "b16" "b17" "b18" "b19" "b20" "b21" "b22" "b23" "b24" "b25" "b26" "b27" "b28" "b29" "b30" "b31"))
(export (;11;) "flag32" (type (eq 10)))
(type (;12;) (func (param "x" 1) (result 1)))
(export (;0;) "roundtrip-flag1" (func (type 12)))
(type (;13;) (func (param "x" 3) (result 3)))
(export (;1;) "roundtrip-flag2" (func (type 13)))
(type (;14;) (func (param "x" 5) (result 5)))
(export (;2;) "roundtrip-flag4" (func (type 14)))
(type (;15;) (func (param "x" 7) (result 7)))
(export (;3;) "roundtrip-flag8" (func (type 15)))
(type (;16;) (func (param "x" 9) (result 9)))
(export (;4;) "roundtrip-flag16" (func (type 16)))
(type (;17;) (func (param "x" 11) (result 11)))
(export (;5;) "roundtrip-flag32" (func (type 17)))
)
)
(import "foo:flags/imports" (instance (;0;) (type 0)))
)
)
(export (;0;) "foo:flags/flags-world" (component (type 0)))
)
)
(export (;3;) "flags-world" (type 2))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,100 @@
package foo:%flags;
interface imports {
flags flag1 {
b0,
}
flags flag2 {
b0,
b1,
}
flags flag4 {
b0,
b1,
b2,
b3,
}
flags flag8 {
b0,
b1,
b2,
b3,
b4,
b5,
b6,
b7,
}
flags flag16 {
b0,
b1,
b2,
b3,
b4,
b5,
b6,
b7,
b8,
b9,
b10,
b11,
b12,
b13,
b14,
b15,
}
flags flag32 {
b0,
b1,
b2,
b3,
b4,
b5,
b6,
b7,
b8,
b9,
b10,
b11,
b12,
b13,
b14,
b15,
b16,
b17,
b18,
b19,
b20,
b21,
b22,
b23,
b24,
b25,
b26,
b27,
b28,
b29,
b30,
b31,
}
roundtrip-flag1: func(x: flag1) -> flag1;
roundtrip-flag2: func(x: flag2) -> flag2;
roundtrip-flag4: func(x: flag4) -> flag4;
roundtrip-flag8: func(x: flag8) -> flag8;
roundtrip-flag16: func(x: flag16) -> flag16;
roundtrip-flag32: func(x: flag32) -> flag32;
}
world flags-world {
import imports;
}

View File

@@ -0,0 +1,100 @@
package foo:%flags;
interface imports {
flags flag1 {
b0,
}
flags flag2 {
b0,
b1,
}
flags flag4 {
b0,
b1,
b2,
b3,
}
flags flag8 {
b0,
b1,
b2,
b3,
b4,
b5,
b6,
b7,
}
flags flag16 {
b0,
b1,
b2,
b3,
b4,
b5,
b6,
b7,
b8,
b9,
b10,
b11,
b12,
b13,
b14,
b15,
}
flags flag32 {
b0,
b1,
b2,
b3,
b4,
b5,
b6,
b7,
b8,
b9,
b10,
b11,
b12,
b13,
b14,
b15,
b16,
b17,
b18,
b19,
b20,
b21,
b22,
b23,
b24,
b25,
b26,
b27,
b28,
b29,
b30,
b31,
}
roundtrip-flag1: func(x: flag1) -> flag1;
roundtrip-flag2: func(x: flag2) -> flag2;
roundtrip-flag4: func(x: flag4) -> flag4;
roundtrip-flag8: func(x: flag8) -> flag8;
roundtrip-flag16: func(x: flag16) -> flag16;
roundtrip-flag32: func(x: flag32) -> flag32;
}
world flags-world {
import imports;
}

View File

@@ -0,0 +1,47 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (func (param "x" f32)))
(export (;0;) "f32-param" (func (type 0)))
(type (;1;) (func (param "x" f64)))
(export (;1;) "f64-param" (func (type 1)))
(type (;2;) (func (result f32)))
(export (;2;) "f32-result" (func (type 2)))
(type (;3;) (func (result f64)))
(export (;3;) "f64-result" (func (type 3)))
)
)
(export (;0;) "foo:floats/floats" (instance (type 0)))
)
)
(export (;1;) "floats" (type 0))
(type (;2;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (func (param "x" f32)))
(export (;0;) "f32-param" (func (type 0)))
(type (;1;) (func (param "x" f64)))
(export (;1;) "f64-param" (func (type 1)))
(type (;2;) (func (result f32)))
(export (;2;) "f32-result" (func (type 2)))
(type (;3;) (func (result f64)))
(export (;3;) "f64-result" (func (type 3)))
)
)
(import "foo:floats/floats" (instance (;0;) (type 0)))
)
)
(export (;0;) "foo:floats/floats-world" (component (type 0)))
)
)
(export (;3;) "floats-world" (type 2))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,12 @@
package foo:floats;
interface floats {
f32-param: func(x: f32);
f64-param: func(x: f64);
f32-result: func() -> f32;
f64-result: func() -> f64;
}
world floats-world {
import floats;
}

View File

@@ -0,0 +1,15 @@
package foo:floats;
interface floats {
f32-param: func(x: f32);
f64-param: func(x: f64);
f32-result: func() -> f32;
f64-result: func() -> f64;
}
world floats-world {
import floats;
}

View File

@@ -0,0 +1,31 @@
(component
(type (;0;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) u8)
(export (;1;) "the-type" (type (eq 0)))
)
)
(import "foo:bar/the-interface" (instance (;0;) (type 0)))
(alias export 0 "the-type" (type (;1;)))
(type (;2;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "bar" (type (eq 0)))
)
)
(import "foo:bar/bar" (instance (;1;) (type 2)))
)
)
(export (;0;) "foo:foo/foo" (component (type 0)))
)
)
(export (;1;) "foo" (type 0))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,9 @@
package foo:bar;
interface bar {
use the-interface.{the-type as bar};
}
interface the-interface {
type the-type = u8;
}

View File

@@ -0,0 +1,5 @@
package foo:foo;
world foo {
import foo:bar/bar;
}

View File

@@ -0,0 +1,6 @@
package foo:foo;
world foo {
import foo:bar/the-interface;
import foo:bar/bar;
}

View File

@@ -0,0 +1,54 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (func))
(export (;0;) "foo" (func (type 0)))
)
)
(export (;0;) "foo:foo/foo" (instance (type 0)))
)
)
(export (;1;) "foo" (type 0))
(type (;2;)
(component
(type (;0;)
(instance
(type (;0;) (func))
(export (;0;) "bar" (func (type 0)))
)
)
(export (;0;) "foo:foo/bar" (instance (type 0)))
)
)
(export (;3;) "bar" (type 2))
(type (;4;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (func))
(export (;0;) "foo" (func (type 0)))
)
)
(import "foo:foo/foo" (instance (;0;) (type 0)))
(type (;1;)
(instance
(type (;0;) (func))
(export (;0;) "bar" (func (type 0)))
)
)
(export (;1;) "foo:foo/bar" (instance (type 1)))
)
)
(export (;0;) "foo:foo/import-and-export" (component (type 0)))
)
)
(export (;5;) "import-and-export" (type 4))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,14 @@
package foo:foo;
interface foo {
foo: func();
}
interface bar {
bar: func();
}
world import-and-export {
import foo;
export bar;
}

View File

@@ -0,0 +1,15 @@
package foo:foo;
interface foo {
foo: func();
}
interface bar {
bar: func();
}
world import-and-export {
import foo;
export bar;
}

View File

@@ -0,0 +1,107 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (func (param "x" u8)))
(export (;0;) "a1" (func (type 0)))
(type (;1;) (func (param "x" s8)))
(export (;1;) "a2" (func (type 1)))
(type (;2;) (func (param "x" u16)))
(export (;2;) "a3" (func (type 2)))
(type (;3;) (func (param "x" s16)))
(export (;3;) "a4" (func (type 3)))
(type (;4;) (func (param "x" u32)))
(export (;4;) "a5" (func (type 4)))
(type (;5;) (func (param "x" s32)))
(export (;5;) "a6" (func (type 5)))
(type (;6;) (func (param "x" u64)))
(export (;6;) "a7" (func (type 6)))
(type (;7;) (func (param "x" s64)))
(export (;7;) "a8" (func (type 7)))
(type (;8;) (func (param "p1" u8) (param "p2" s8) (param "p3" u16) (param "p4" s16) (param "p5" u32) (param "p6" s32) (param "p7" u64) (param "p8" s64)))
(export (;8;) "a9" (func (type 8)))
(type (;9;) (func (result u8)))
(export (;9;) "r1" (func (type 9)))
(type (;10;) (func (result s8)))
(export (;10;) "r2" (func (type 10)))
(type (;11;) (func (result u16)))
(export (;11;) "r3" (func (type 11)))
(type (;12;) (func (result s16)))
(export (;12;) "r4" (func (type 12)))
(type (;13;) (func (result u32)))
(export (;13;) "r5" (func (type 13)))
(type (;14;) (func (result s32)))
(export (;14;) "r6" (func (type 14)))
(type (;15;) (func (result u64)))
(export (;15;) "r7" (func (type 15)))
(type (;16;) (func (result s64)))
(export (;16;) "r8" (func (type 16)))
(type (;17;) (tuple s64 u8))
(type (;18;) (func (result 17)))
(export (;17;) "pair-ret" (func (type 18)))
(export (;18;) "multi-ret" (func (type 18)))
)
)
(export (;0;) "foo:foo/integers" (instance (type 0)))
)
)
(export (;1;) "integers" (type 0))
(type (;2;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (func (param "x" u8)))
(export (;0;) "a1" (func (type 0)))
(type (;1;) (func (param "x" s8)))
(export (;1;) "a2" (func (type 1)))
(type (;2;) (func (param "x" u16)))
(export (;2;) "a3" (func (type 2)))
(type (;3;) (func (param "x" s16)))
(export (;3;) "a4" (func (type 3)))
(type (;4;) (func (param "x" u32)))
(export (;4;) "a5" (func (type 4)))
(type (;5;) (func (param "x" s32)))
(export (;5;) "a6" (func (type 5)))
(type (;6;) (func (param "x" u64)))
(export (;6;) "a7" (func (type 6)))
(type (;7;) (func (param "x" s64)))
(export (;7;) "a8" (func (type 7)))
(type (;8;) (func (param "p1" u8) (param "p2" s8) (param "p3" u16) (param "p4" s16) (param "p5" u32) (param "p6" s32) (param "p7" u64) (param "p8" s64)))
(export (;8;) "a9" (func (type 8)))
(type (;9;) (func (result u8)))
(export (;9;) "r1" (func (type 9)))
(type (;10;) (func (result s8)))
(export (;10;) "r2" (func (type 10)))
(type (;11;) (func (result u16)))
(export (;11;) "r3" (func (type 11)))
(type (;12;) (func (result s16)))
(export (;12;) "r4" (func (type 12)))
(type (;13;) (func (result u32)))
(export (;13;) "r5" (func (type 13)))
(type (;14;) (func (result s32)))
(export (;14;) "r6" (func (type 14)))
(type (;15;) (func (result u64)))
(export (;15;) "r7" (func (type 15)))
(type (;16;) (func (result s64)))
(export (;16;) "r8" (func (type 16)))
(type (;17;) (tuple s64 u8))
(type (;18;) (func (result 17)))
(export (;17;) "pair-ret" (func (type 18)))
(export (;18;) "multi-ret" (func (type 18)))
)
)
(import "foo:foo/integers" (instance (;0;) (type 0)))
)
)
(export (;0;) "foo:foo/integers-world" (component (type 0)))
)
)
(export (;3;) "integers-world" (type 2))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,27 @@
package foo:foo;
interface integers {
a1: func(x: u8);
a2: func(x: s8);
a3: func(x: u16);
a4: func(x: s16);
a5: func(x: u32);
a6: func(x: s32);
a7: func(x: u64);
a8: func(x: s64);
a9: func(p1: u8, p2: s8, p3: u16, p4: s16, p5: u32, p6: s32, p7: u64, p8: s64);
r1: func() -> u8;
r2: func() -> s8;
r3: func() -> u16;
r4: func() -> s16;
r5: func() -> u32;
r6: func() -> s32;
r7: func() -> u64;
r8: func() -> s64;
pair-ret: func() -> tuple<s64, u8>;
multi-ret: func() -> tuple<s64, u8>;
}
world integers-world {
import integers;
}

View File

@@ -0,0 +1,45 @@
package foo:foo;
interface integers {
a1: func(x: u8);
a2: func(x: s8);
a3: func(x: u16);
a4: func(x: s16);
a5: func(x: u32);
a6: func(x: s32);
a7: func(x: u64);
a8: func(x: s64);
a9: func(p1: u8, p2: s8, p3: u16, p4: s16, p5: u32, p6: s32, p7: u64, p8: s64);
r1: func() -> u8;
r2: func() -> s8;
r3: func() -> u16;
r4: func() -> s16;
r5: func() -> u32;
r6: func() -> s32;
r7: func() -> u64;
r8: func() -> s64;
pair-ret: func() -> tuple<s64, u8>;
multi-ret: func() -> tuple<s64, u8>;
}
world integers-world {
import integers;
}

View File

@@ -0,0 +1,211 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (list u8))
(type (;1;) (record (field "a1" u32) (field "a2" u64) (field "a3" s32) (field "a4" s64) (field "b" string) (field "c" 0)))
(export (;2;) "other-record" (type (eq 1)))
(type (;3;) (record (field "x" string) (field "y" 2) (field "c1" u32) (field "c2" u64) (field "c3" s32) (field "c4" s64)))
(export (;4;) "some-record" (type (eq 3)))
(type (;5;) (variant (case "a") (case "b" u32) (case "c" string)))
(export (;6;) "other-variant" (type (eq 5)))
(type (;7;) (list 6))
(type (;8;) (variant (case "a" string) (case "b") (case "c" u32) (case "d" 7)))
(export (;9;) "some-variant" (type (eq 8)))
(type (;10;) (tuple string u8 s8 u16 s16 u32 s32 u64 s64 f32 f64 char))
(type (;11;) (list 10))
(export (;12;) "load-store-all-sizes" (type (eq 11)))
(type (;13;) (func (param "x" 0)))
(export (;0;) "list-u8-param" (func (type 13)))
(type (;14;) (list u16))
(type (;15;) (func (param "x" 14)))
(export (;1;) "list-u16-param" (func (type 15)))
(type (;16;) (list u32))
(type (;17;) (func (param "x" 16)))
(export (;2;) "list-u32-param" (func (type 17)))
(type (;18;) (list u64))
(type (;19;) (func (param "x" 18)))
(export (;3;) "list-u64-param" (func (type 19)))
(type (;20;) (list s8))
(type (;21;) (func (param "x" 20)))
(export (;4;) "list-s8-param" (func (type 21)))
(type (;22;) (list s16))
(type (;23;) (func (param "x" 22)))
(export (;5;) "list-s16-param" (func (type 23)))
(type (;24;) (list s32))
(type (;25;) (func (param "x" 24)))
(export (;6;) "list-s32-param" (func (type 25)))
(type (;26;) (list s64))
(type (;27;) (func (param "x" 26)))
(export (;7;) "list-s64-param" (func (type 27)))
(type (;28;) (list f32))
(type (;29;) (func (param "x" 28)))
(export (;8;) "list-f32-param" (func (type 29)))
(type (;30;) (list f64))
(type (;31;) (func (param "x" 30)))
(export (;9;) "list-f64-param" (func (type 31)))
(type (;32;) (func (result 0)))
(export (;10;) "list-u8-ret" (func (type 32)))
(type (;33;) (func (result 14)))
(export (;11;) "list-u16-ret" (func (type 33)))
(type (;34;) (func (result 16)))
(export (;12;) "list-u32-ret" (func (type 34)))
(type (;35;) (func (result 18)))
(export (;13;) "list-u64-ret" (func (type 35)))
(type (;36;) (func (result 20)))
(export (;14;) "list-s8-ret" (func (type 36)))
(type (;37;) (func (result 22)))
(export (;15;) "list-s16-ret" (func (type 37)))
(type (;38;) (func (result 24)))
(export (;16;) "list-s32-ret" (func (type 38)))
(type (;39;) (func (result 26)))
(export (;17;) "list-s64-ret" (func (type 39)))
(type (;40;) (func (result 28)))
(export (;18;) "list-f32-ret" (func (type 40)))
(type (;41;) (func (result 30)))
(export (;19;) "list-f64-ret" (func (type 41)))
(type (;42;) (tuple u8 s8))
(type (;43;) (list 42))
(type (;44;) (tuple s64 u32))
(type (;45;) (list 44))
(type (;46;) (func (param "x" 43) (result 45)))
(export (;20;) "tuple-list" (func (type 46)))
(type (;47;) (list string))
(type (;48;) (func (param "a" 47)))
(export (;21;) "string-list-arg" (func (type 48)))
(type (;49;) (func (result 47)))
(export (;22;) "string-list-ret" (func (type 49)))
(type (;50;) (tuple u8 string))
(type (;51;) (list 50))
(type (;52;) (tuple string u8))
(type (;53;) (list 52))
(type (;54;) (func (param "x" 51) (result 53)))
(export (;23;) "tuple-string-list" (func (type 54)))
(type (;55;) (func (param "x" 47) (result 47)))
(export (;24;) "string-list" (func (type 55)))
(type (;56;) (list 4))
(type (;57;) (list 2))
(type (;58;) (func (param "x" 56) (result 57)))
(export (;25;) "record-list" (func (type 58)))
(type (;59;) (list 9))
(type (;60;) (func (param "x" 59) (result 7)))
(export (;26;) "variant-list" (func (type 60)))
(type (;61;) (func (param "a" 12) (result 12)))
(export (;27;) "load-store-everything" (func (type 61)))
)
)
(export (;0;) "foo:foo/lists" (instance (type 0)))
)
)
(export (;1;) "lists" (type 0))
(type (;2;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (list u8))
(type (;1;) (record (field "a1" u32) (field "a2" u64) (field "a3" s32) (field "a4" s64) (field "b" string) (field "c" 0)))
(export (;2;) "other-record" (type (eq 1)))
(type (;3;) (record (field "x" string) (field "y" 2) (field "c1" u32) (field "c2" u64) (field "c3" s32) (field "c4" s64)))
(export (;4;) "some-record" (type (eq 3)))
(type (;5;) (variant (case "a") (case "b" u32) (case "c" string)))
(export (;6;) "other-variant" (type (eq 5)))
(type (;7;) (list 6))
(type (;8;) (variant (case "a" string) (case "b") (case "c" u32) (case "d" 7)))
(export (;9;) "some-variant" (type (eq 8)))
(type (;10;) (tuple string u8 s8 u16 s16 u32 s32 u64 s64 f32 f64 char))
(type (;11;) (list 10))
(export (;12;) "load-store-all-sizes" (type (eq 11)))
(type (;13;) (func (param "x" 0)))
(export (;0;) "list-u8-param" (func (type 13)))
(type (;14;) (list u16))
(type (;15;) (func (param "x" 14)))
(export (;1;) "list-u16-param" (func (type 15)))
(type (;16;) (list u32))
(type (;17;) (func (param "x" 16)))
(export (;2;) "list-u32-param" (func (type 17)))
(type (;18;) (list u64))
(type (;19;) (func (param "x" 18)))
(export (;3;) "list-u64-param" (func (type 19)))
(type (;20;) (list s8))
(type (;21;) (func (param "x" 20)))
(export (;4;) "list-s8-param" (func (type 21)))
(type (;22;) (list s16))
(type (;23;) (func (param "x" 22)))
(export (;5;) "list-s16-param" (func (type 23)))
(type (;24;) (list s32))
(type (;25;) (func (param "x" 24)))
(export (;6;) "list-s32-param" (func (type 25)))
(type (;26;) (list s64))
(type (;27;) (func (param "x" 26)))
(export (;7;) "list-s64-param" (func (type 27)))
(type (;28;) (list f32))
(type (;29;) (func (param "x" 28)))
(export (;8;) "list-f32-param" (func (type 29)))
(type (;30;) (list f64))
(type (;31;) (func (param "x" 30)))
(export (;9;) "list-f64-param" (func (type 31)))
(type (;32;) (func (result 0)))
(export (;10;) "list-u8-ret" (func (type 32)))
(type (;33;) (func (result 14)))
(export (;11;) "list-u16-ret" (func (type 33)))
(type (;34;) (func (result 16)))
(export (;12;) "list-u32-ret" (func (type 34)))
(type (;35;) (func (result 18)))
(export (;13;) "list-u64-ret" (func (type 35)))
(type (;36;) (func (result 20)))
(export (;14;) "list-s8-ret" (func (type 36)))
(type (;37;) (func (result 22)))
(export (;15;) "list-s16-ret" (func (type 37)))
(type (;38;) (func (result 24)))
(export (;16;) "list-s32-ret" (func (type 38)))
(type (;39;) (func (result 26)))
(export (;17;) "list-s64-ret" (func (type 39)))
(type (;40;) (func (result 28)))
(export (;18;) "list-f32-ret" (func (type 40)))
(type (;41;) (func (result 30)))
(export (;19;) "list-f64-ret" (func (type 41)))
(type (;42;) (tuple u8 s8))
(type (;43;) (list 42))
(type (;44;) (tuple s64 u32))
(type (;45;) (list 44))
(type (;46;) (func (param "x" 43) (result 45)))
(export (;20;) "tuple-list" (func (type 46)))
(type (;47;) (list string))
(type (;48;) (func (param "a" 47)))
(export (;21;) "string-list-arg" (func (type 48)))
(type (;49;) (func (result 47)))
(export (;22;) "string-list-ret" (func (type 49)))
(type (;50;) (tuple u8 string))
(type (;51;) (list 50))
(type (;52;) (tuple string u8))
(type (;53;) (list 52))
(type (;54;) (func (param "x" 51) (result 53)))
(export (;23;) "tuple-string-list" (func (type 54)))
(type (;55;) (func (param "x" 47) (result 47)))
(export (;24;) "string-list" (func (type 55)))
(type (;56;) (list 4))
(type (;57;) (list 2))
(type (;58;) (func (param "x" 56) (result 57)))
(export (;25;) "record-list" (func (type 58)))
(type (;59;) (list 9))
(type (;60;) (func (param "x" 59) (result 7)))
(export (;26;) "variant-list" (func (type 60)))
(type (;61;) (func (param "a" 12) (result 12)))
(export (;27;) "load-store-everything" (func (type 61)))
)
)
(import "foo:foo/lists" (instance (;0;) (type 0)))
)
)
(export (;0;) "foo:foo/lists-world" (component (type 0)))
)
)
(export (;3;) "lists-world" (type 2))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,96 @@
package foo:foo;
interface lists {
record other-record {
a1: u32,
a2: u64,
a3: s32,
a4: s64,
b: string,
c: list<u8>,
}
record some-record {
x: string,
y: other-record,
c1: u32,
c2: u64,
c3: s32,
c4: s64,
}
variant other-variant {
a,
b(u32),
c(string),
}
variant some-variant {
a(string),
b,
c(u32),
d(list<other-variant>),
}
type load-store-all-sizes = list<tuple<string, u8, s8, u16, s16, u32, s32, u64, s64, f32, f64, char>>;
list-u8-param: func(x: list<u8>);
list-u16-param: func(x: list<u16>);
list-u32-param: func(x: list<u32>);
list-u64-param: func(x: list<u64>);
list-s8-param: func(x: list<s8>);
list-s16-param: func(x: list<s16>);
list-s32-param: func(x: list<s32>);
list-s64-param: func(x: list<s64>);
list-f32-param: func(x: list<f32>);
list-f64-param: func(x: list<f64>);
list-u8-ret: func() -> list<u8>;
list-u16-ret: func() -> list<u16>;
list-u32-ret: func() -> list<u32>;
list-u64-ret: func() -> list<u64>;
list-s8-ret: func() -> list<s8>;
list-s16-ret: func() -> list<s16>;
list-s32-ret: func() -> list<s32>;
list-s64-ret: func() -> list<s64>;
list-f32-ret: func() -> list<f32>;
list-f64-ret: func() -> list<f64>;
tuple-list: func(x: list<tuple<u8, s8>>) -> list<tuple<s64, u32>>;
string-list-arg: func(a: list<string>);
string-list-ret: func() -> list<string>;
tuple-string-list: func(x: list<tuple<u8, string>>) -> list<tuple<string, u8>>;
string-list: func(x: list<string>) -> list<string>;
record-list: func(x: list<some-record>) -> list<other-record>;
variant-list: func(x: list<some-variant>) -> list<other-variant>;
load-store-everything: func(a: load-store-all-sizes) -> load-store-all-sizes;
}
world lists-world {
import lists;
}

View File

@@ -0,0 +1,96 @@
package foo:foo;
interface lists {
record other-record {
a1: u32,
a2: u64,
a3: s32,
a4: s64,
b: string,
c: list<u8>,
}
record some-record {
x: string,
y: other-record,
c1: u32,
c2: u64,
c3: s32,
c4: s64,
}
variant other-variant {
a,
b(u32),
c(string),
}
variant some-variant {
a(string),
b,
c(u32),
d(list<other-variant>),
}
type load-store-all-sizes = list<tuple<string, u8, s8, u16, s16, u32, s32, u64, s64, f32, f64, char>>;
list-u8-param: func(x: list<u8>);
list-u16-param: func(x: list<u16>);
list-u32-param: func(x: list<u32>);
list-u64-param: func(x: list<u64>);
list-s8-param: func(x: list<s8>);
list-s16-param: func(x: list<s16>);
list-s32-param: func(x: list<s32>);
list-s64-param: func(x: list<s64>);
list-f32-param: func(x: list<f32>);
list-f64-param: func(x: list<f64>);
list-u8-ret: func() -> list<u8>;
list-u16-ret: func() -> list<u16>;
list-u32-ret: func() -> list<u32>;
list-u64-ret: func() -> list<u64>;
list-s8-ret: func() -> list<s8>;
list-s16-ret: func() -> list<s16>;
list-s32-ret: func() -> list<s32>;
list-s64-ret: func() -> list<s64>;
list-f32-ret: func() -> list<f32>;
list-f64-ret: func() -> list<f64>;
tuple-list: func(x: list<tuple<u8, s8>>) -> list<tuple<s64, u32>>;
string-list-arg: func(a: list<string>);
string-list-ret: func() -> list<string>;
tuple-string-list: func(x: list<tuple<u8, string>>) -> list<tuple<string, u8>>;
string-list: func(x: list<string>) -> list<string>;
record-list: func(x: list<some-record>) -> list<other-record>;
variant-list: func(x: list<some-variant>) -> list<other-variant>;
load-store-everything: func(a: load-store-all-sizes) -> load-store-all-sizes;
}
world lists-world {
import lists;
}

View File

@@ -0,0 +1,186 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (map bool string))
(export (;1;) "bool-map" (type (eq 0)))
(type (;2;) (map u8 string))
(export (;3;) "u8-map" (type (eq 2)))
(type (;4;) (map u16 string))
(export (;5;) "u16-map" (type (eq 4)))
(type (;6;) (map u32 string))
(export (;7;) "u32-map" (type (eq 6)))
(type (;8;) (map u64 string))
(export (;9;) "u64-map" (type (eq 8)))
(type (;10;) (map s8 string))
(export (;11;) "s8-map" (type (eq 10)))
(type (;12;) (map s16 string))
(export (;13;) "s16-map" (type (eq 12)))
(type (;14;) (map s32 string))
(export (;15;) "s32-map" (type (eq 14)))
(type (;16;) (map s64 string))
(export (;17;) "s64-map" (type (eq 16)))
(type (;18;) (map char string))
(export (;19;) "char-map" (type (eq 18)))
(type (;20;) (map string u32))
(export (;21;) "string-map" (type (eq 20)))
(type (;22;) (map string bool))
(export (;23;) "string-to-bool" (type (eq 22)))
(type (;24;) (list u8))
(type (;25;) (map string 24))
(export (;26;) "string-to-list" (type (eq 25)))
(type (;27;) (option u32))
(type (;28;) (map string 27))
(export (;29;) "string-to-option" (type (eq 28)))
(type (;30;) (result u32 (error string)))
(type (;31;) (map string 30))
(export (;32;) "string-to-result" (type (eq 31)))
(type (;33;) (tuple u32 string))
(type (;34;) (map string 33))
(export (;35;) "string-to-tuple" (type (eq 34)))
(type (;36;) (map string u32))
(type (;37;) (map string 36))
(export (;38;) "map-of-maps" (type (eq 37)))
(type (;39;) (list 36))
(export (;40;) "list-of-maps" (type (eq 39)))
(type (;41;) (option 36))
(export (;42;) "option-of-map" (type (eq 41)))
(type (;43;) (func (param "x" 36)))
(export (;0;) "map-param" (func (type 43)))
(type (;44;) (func (result 36)))
(export (;1;) "map-result" (func (type 44)))
(type (;45;) (map u32 string))
(type (;46;) (func (param "x" 45) (result 45)))
(export (;2;) "map-roundtrip" (func (type 46)))
)
)
(export (;0;) "foo:maps-test/maps-interface" (instance (type 0)))
)
)
(export (;1;) "maps-interface" (type 0))
(type (;2;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (map bool string))
(export (;1;) "bool-map" (type (eq 0)))
(type (;2;) (map u8 string))
(export (;3;) "u8-map" (type (eq 2)))
(type (;4;) (map u16 string))
(export (;5;) "u16-map" (type (eq 4)))
(type (;6;) (map u32 string))
(export (;7;) "u32-map" (type (eq 6)))
(type (;8;) (map u64 string))
(export (;9;) "u64-map" (type (eq 8)))
(type (;10;) (map s8 string))
(export (;11;) "s8-map" (type (eq 10)))
(type (;12;) (map s16 string))
(export (;13;) "s16-map" (type (eq 12)))
(type (;14;) (map s32 string))
(export (;15;) "s32-map" (type (eq 14)))
(type (;16;) (map s64 string))
(export (;17;) "s64-map" (type (eq 16)))
(type (;18;) (map char string))
(export (;19;) "char-map" (type (eq 18)))
(type (;20;) (map string u32))
(export (;21;) "string-map" (type (eq 20)))
(type (;22;) (map string bool))
(export (;23;) "string-to-bool" (type (eq 22)))
(type (;24;) (list u8))
(type (;25;) (map string 24))
(export (;26;) "string-to-list" (type (eq 25)))
(type (;27;) (option u32))
(type (;28;) (map string 27))
(export (;29;) "string-to-option" (type (eq 28)))
(type (;30;) (result u32 (error string)))
(type (;31;) (map string 30))
(export (;32;) "string-to-result" (type (eq 31)))
(type (;33;) (tuple u32 string))
(type (;34;) (map string 33))
(export (;35;) "string-to-tuple" (type (eq 34)))
(type (;36;) (map string u32))
(type (;37;) (map string 36))
(export (;38;) "map-of-maps" (type (eq 37)))
(type (;39;) (list 36))
(export (;40;) "list-of-maps" (type (eq 39)))
(type (;41;) (option 36))
(export (;42;) "option-of-map" (type (eq 41)))
(type (;43;) (func (param "x" 36)))
(export (;0;) "map-param" (func (type 43)))
(type (;44;) (func (result 36)))
(export (;1;) "map-result" (func (type 44)))
(type (;45;) (map u32 string))
(type (;46;) (func (param "x" 45) (result 45)))
(export (;2;) "map-roundtrip" (func (type 46)))
)
)
(import "foo:maps-test/maps-interface" (instance (;0;) (type 0)))
(type (;1;)
(instance
(type (;0;) (map bool string))
(export (;1;) "bool-map" (type (eq 0)))
(type (;2;) (map u8 string))
(export (;3;) "u8-map" (type (eq 2)))
(type (;4;) (map u16 string))
(export (;5;) "u16-map" (type (eq 4)))
(type (;6;) (map u32 string))
(export (;7;) "u32-map" (type (eq 6)))
(type (;8;) (map u64 string))
(export (;9;) "u64-map" (type (eq 8)))
(type (;10;) (map s8 string))
(export (;11;) "s8-map" (type (eq 10)))
(type (;12;) (map s16 string))
(export (;13;) "s16-map" (type (eq 12)))
(type (;14;) (map s32 string))
(export (;15;) "s32-map" (type (eq 14)))
(type (;16;) (map s64 string))
(export (;17;) "s64-map" (type (eq 16)))
(type (;18;) (map char string))
(export (;19;) "char-map" (type (eq 18)))
(type (;20;) (map string u32))
(export (;21;) "string-map" (type (eq 20)))
(type (;22;) (map string bool))
(export (;23;) "string-to-bool" (type (eq 22)))
(type (;24;) (list u8))
(type (;25;) (map string 24))
(export (;26;) "string-to-list" (type (eq 25)))
(type (;27;) (option u32))
(type (;28;) (map string 27))
(export (;29;) "string-to-option" (type (eq 28)))
(type (;30;) (result u32 (error string)))
(type (;31;) (map string 30))
(export (;32;) "string-to-result" (type (eq 31)))
(type (;33;) (tuple u32 string))
(type (;34;) (map string 33))
(export (;35;) "string-to-tuple" (type (eq 34)))
(type (;36;) (map string u32))
(type (;37;) (map string 36))
(export (;38;) "map-of-maps" (type (eq 37)))
(type (;39;) (list 36))
(export (;40;) "list-of-maps" (type (eq 39)))
(type (;41;) (option 36))
(export (;42;) "option-of-map" (type (eq 41)))
(type (;43;) (func (param "x" 36)))
(export (;0;) "map-param" (func (type 43)))
(type (;44;) (func (result 36)))
(export (;1;) "map-result" (func (type 44)))
(type (;45;) (map u32 string))
(type (;46;) (func (param "x" 45) (result 45)))
(export (;2;) "map-roundtrip" (func (type 46)))
)
)
(export (;1;) "foo:maps-test/maps-interface" (instance (type 1)))
)
)
(export (;0;) "foo:maps-test/maps-test-world" (component (type 0)))
)
)
(export (;3;) "maps-test-world" (type 2))
(@custom "package-docs" "\01{\22interfaces\22:{\22maps-interface\22:{\22funcs\22:{\22map-param\22:{\22docs\22:\22Functions\22}},\22types\22:{\22bool-map\22:{\22docs\22:\22Test all primitive key types\22},\22string-to-bool\22:{\22docs\22:\22Test all value types\22},\22map-of-maps\22:{\22docs\22:\22Nested structures\22}}}}}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,38 @@
package foo:maps-test;
interface maps-interface {
// Test all primitive key types
type bool-map = map<bool, string>;
type u8-map = map<u8, string>;
type u16-map = map<u16, string>;
type u32-map = map<u32, string>;
type u64-map = map<u64, string>;
type s8-map = map<s8, string>;
type s16-map = map<s16, string>;
type s32-map = map<s32, string>;
type s64-map = map<s64, string>;
type char-map = map<char, string>;
type string-map = map<string, u32>;
// Test all value types
type string-to-bool = map<string, bool>;
type string-to-list = map<string, list<u8>>;
type string-to-option = map<string, option<u32>>;
type string-to-result = map<string, result<u32, string>>;
type string-to-tuple = map<string, tuple<u32, string>>;
// Nested structures
type map-of-maps = map<string, map<string, u32>>;
type list-of-maps = list<map<string, u32>>;
type option-of-map = option<map<string, u32>>;
// Functions
map-param: func(x: map<string, u32>);
map-result: func() -> map<string, u32>;
map-roundtrip: func(x: map<u32, string>) -> map<u32, string>;
}
world maps-test-world {
import maps-interface;
export maps-interface;
}

View File

@@ -0,0 +1,57 @@
package foo:maps-test;
interface maps-interface {
/// Test all primitive key types
type bool-map = map<bool, string>;
type u8-map = map<u8, string>;
type u16-map = map<u16, string>;
type u32-map = map<u32, string>;
type u64-map = map<u64, string>;
type s8-map = map<s8, string>;
type s16-map = map<s16, string>;
type s32-map = map<s32, string>;
type s64-map = map<s64, string>;
type char-map = map<char, string>;
type string-map = map<string, u32>;
/// Test all value types
type string-to-bool = map<string, bool>;
type string-to-list = map<string, list<u8>>;
type string-to-option = map<string, option<u32>>;
type string-to-result = map<string, result<u32, string>>;
type string-to-tuple = map<string, tuple<u32, string>>;
/// Nested structures
type map-of-maps = map<string, map<string, u32>>;
type list-of-maps = list<map<string, u32>>;
type option-of-map = option<map<string, u32>>;
/// Functions
map-param: func(x: map<string, u32>);
map-result: func() -> map<string, u32>;
map-roundtrip: func(x: map<u32, string>) -> map<u32, string>;
}
world maps-test-world {
import maps-interface;
export maps-interface;
}

View File

@@ -0,0 +1,78 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (record (field "f" u8)))
(export (;1;) "the-type" (type (eq 0)))
)
)
(export (;0;) "foo:foo/b" (instance (type 0)))
)
)
(export (;1;) "b" (type 0))
(type (;2;)
(component
(type (;0;)
(instance
(type (;0;) (record (field "f" u8)))
(export (;1;) "the-type" (type (eq 0)))
)
)
(import "foo:foo/b" (instance (;0;) (type 0)))
(alias export 0 "the-type" (type (;1;)))
(type (;2;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "the-type" (type (eq 0)))
)
)
(export (;1;) "foo:foo/a" (instance (type 2)))
)
)
(export (;3;) "a" (type 2))
(type (;4;)
(component
(type (;0;)
(instance
(type (;0;) (record (field "f" u8)))
(export (;1;) "the-type" (type (eq 0)))
)
)
(import "foo:foo/b" (instance (;0;) (type 0)))
(alias export 0 "the-type" (type (;1;)))
(type (;2;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "the-type" (type (eq 0)))
)
)
(export (;1;) "foo:foo/b2" (instance (type 2)))
)
)
(export (;5;) "b2" (type 4))
(type (;6;)
(component
(type (;0;)
(instance
(type (;0;) (record (field "f" u8)))
(export (;1;) "the-type" (type (eq 0)))
)
)
(import "foo:foo/b" (instance (;0;) (type 0)))
(alias export 0 "the-type" (type (;1;)))
(type (;2;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "the-type" (type (eq 0)))
)
)
(export (;1;) "foo:foo/a2" (instance (type 2)))
)
)
(export (;7;) "a2" (type 6))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,9 @@
package foo:foo;
interface a {
use b.{the-type};
}
interface b2 {
use b.{the-type};
}

View File

@@ -0,0 +1,9 @@
interface a2 {
use b.{the-type};
}
interface b {
record the-type {
f: u8,
}
}

View File

@@ -0,0 +1,20 @@
package foo:foo;
interface b {
record the-type {
f: u8,
}
}
interface a {
use b.{the-type};
}
interface b2 {
use b.{the-type};
}
interface a2 {
use b.{the-type};
}

View File

@@ -0,0 +1,67 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) u8)
(export (;1;) "t1" (type (eq 0)))
(type (;2;) u8)
(export (;3;) "t2" (type (eq 2)))
)
)
(export (;0;) "foo:multiuse/foo" (instance (type 0)))
)
)
(export (;1;) "foo" (type 0))
(type (;2;)
(component
(type (;0;)
(instance
(type (;0;) u8)
(export (;1;) "u" (type (eq 0)))
)
)
(export (;0;) "foo:multiuse/bar" (instance (type 0)))
)
)
(export (;3;) "bar" (type 2))
(type (;4;)
(component
(type (;0;)
(instance
(type (;0;) u8)
(export (;1;) "t1" (type (eq 0)))
(type (;2;) u8)
(export (;3;) "t2" (type (eq 2)))
)
)
(import "foo:multiuse/foo" (instance (;0;) (type 0)))
(type (;1;)
(instance
(type (;0;) u8)
(export (;1;) "u" (type (eq 0)))
)
)
(import "foo:multiuse/bar" (instance (;1;) (type 1)))
(alias export 0 "t1" (type (;2;)))
(alias export 1 "u" (type (;3;)))
(alias export 0 "t2" (type (;4;)))
(type (;5;)
(instance
(alias outer 1 2 (type (;0;)))
(export (;1;) "t1" (type (eq 0)))
(alias outer 1 3 (type (;2;)))
(export (;3;) "u" (type (eq 2)))
(alias outer 1 4 (type (;4;)))
(export (;5;) "t2" (type (eq 4)))
)
)
(export (;2;) "foo:multiuse/baz" (instance (type 5)))
)
)
(export (;5;) "baz" (type 4))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,16 @@
package foo:multiuse;
interface foo {
type t1 = u8;
type t2 = u8;
}
interface bar {
type u = u8;
}
interface baz {
use foo.{t1};
use bar.{u};
use foo.{t2};
}

View File

@@ -0,0 +1,18 @@
package foo:multiuse;
interface foo {
type t1 = u8;
type t2 = u8;
}
interface bar {
type u = u8;
}
interface baz {
use foo.{t1};
use bar.{u};
use foo.{t2};
}

View File

@@ -0,0 +1,70 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) u8)
(export (;1;) "a" (type (eq 0)))
)
)
(export (;0;) "foo:chain/a" (instance (type 0)))
)
)
(export (;1;) "a" (type 0))
(type (;2;)
(component
(type (;0;)
(instance
(type (;0;) u8)
(export (;1;) "a" (type (eq 0)))
)
)
(import "foo:chain/a" (instance (;0;) (type 0)))
(alias export 0 "a" (type (;1;)))
(type (;2;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "a" (type (eq 0)))
(type (;2;) (enum "other"))
(export (;3;) "name" (type (eq 2)))
)
)
(export (;1;) "foo:chain/def" (instance (type 2)))
)
)
(export (;3;) "def" (type 2))
(type (;4;)
(component
(type (;0;)
(instance
(type (;0;) u8)
(export (;1;) "a" (type (eq 0)))
)
)
(import "foo:chain/a" (instance (;0;) (type 0)))
(alias export 0 "a" (type (;1;)))
(type (;2;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "a" (type (eq 0)))
(type (;2;) (enum "other"))
(export (;3;) "name" (type (eq 2)))
)
)
(import "foo:chain/def" (instance (;1;) (type 2)))
(alias export 1 "name" (type (;3;)))
(type (;4;)
(instance
(alias outer 1 3 (type (;0;)))
(export (;1;) "name" (type (eq 0)))
)
)
(export (;2;) "foo:chain/foo" (instance (type 4)))
)
)
(export (;5;) "foo" (type 4))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,18 @@
package foo:chain;
interface a {
type a = u8;
}
interface def {
use a.{a};
enum name {
other,
}
}
interface foo {
use def.{name};
}

View File

@@ -0,0 +1,13 @@
package foo:chain;
interface def {
use a.{a};
enum name {
other,
}
}
interface a {
type a = u8;
}

View File

@@ -0,0 +1,5 @@
package foo:chain;
interface foo {
use def.{name};
}

View File

@@ -0,0 +1,70 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (record (field "f" u8)))
(export (;1;) "name" (type (eq 0)))
)
)
(export (;0;) "foo:foo/other" (instance (type 0)))
)
)
(export (;1;) "other" (type 0))
(type (;2;)
(component
(type (;0;)
(instance
(type (;0;) (record (field "f" u8)))
(export (;1;) "name" (type (eq 0)))
)
)
(import "foo:foo/other" (instance (;0;) (type 0)))
(alias export 0 "name" (type (;1;)))
(type (;2;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "the-name" (type (eq 0)))
(type (;2;) (enum "a"))
(export (;3;) "name" (type (eq 2)))
)
)
(export (;1;) "foo:foo/bar" (instance (type 2)))
)
)
(export (;3;) "bar" (type 2))
(type (;4;)
(component
(type (;0;)
(instance
(type (;0;) (record (field "f" u8)))
(export (;1;) "name" (type (eq 0)))
)
)
(import "foo:foo/other" (instance (;0;) (type 0)))
(alias export 0 "name" (type (;1;)))
(type (;2;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "the-name" (type (eq 0)))
(type (;2;) (enum "a"))
(export (;3;) "name" (type (eq 2)))
)
)
(import "foo:foo/bar" (instance (;1;) (type 2)))
(alias export 1 "the-name" (type (;3;)))
(type (;4;)
(instance
(alias outer 1 3 (type (;0;)))
(export (;1;) "the-name" (type (eq 0)))
)
)
(export (;2;) "foo:foo/foo" (instance (type 4)))
)
)
(export (;5;) "foo" (type 4))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,13 @@
interface bar {
use other.{name as the-name};
enum name {
a
}
}
interface other {
record name {
f: u8,
}
}

View File

@@ -0,0 +1,5 @@
package foo:foo;
interface foo {
use bar.{the-name};
}

View File

@@ -0,0 +1,20 @@
package foo:foo;
interface other {
record name {
f: u8,
}
}
interface bar {
use other.{name as the-name};
enum name {
a,
}
}
interface foo {
use bar.{the-name};
}

View File

@@ -0,0 +1,47 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (enum "b"))
(export (;1;) "a" (type (eq 0)))
(type (;2;) (record (field "f" u8)))
(export (;3;) "ty" (type (eq 2)))
)
)
(import "foo:dep/foo" (instance (;0;) (type 0)))
(alias export 0 "ty" (type (;1;)))
(type (;2;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "ty" (type (eq 0)))
)
)
(export (;1;) "foo:foo/foo" (instance (type 2)))
)
)
(export (;1;) "foo" (type 0))
(type (;2;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (enum "b"))
(export (;1;) "a" (type (eq 0)))
(type (;2;) (record (field "f" u8)))
(export (;3;) "ty" (type (eq 2)))
)
)
(import "foo:dep/foo" (instance (;0;) (type 0)))
)
)
(export (;0;) "foo:foo/bar" (component (type 0)))
)
)
(export (;3;) "bar" (type 2))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,11 @@
package foo:dep;
interface foo {
enum a {
b
}
record ty {
f: u8,
}
}

View File

@@ -0,0 +1,9 @@
package foo:foo;
interface foo {
use foo:dep/foo.{ty};
}
world bar {
import foo:dep/foo;
}

View File

@@ -0,0 +1,9 @@
package foo:foo;
interface foo {
use foo:dep/foo.{ty};
}
world bar {
import foo:dep/foo;
}

View File

@@ -0,0 +1,24 @@
(component
(type (;0;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (record (field "f" u8)))
(export (;1;) "foo" (type (eq 0)))
(export (;2;) "bar" (type (eq 1)))
)
)
(export (;0;) "foo:my-dep/my-interface" (instance (type 0)))
)
)
(export (;0;) "foo:foo/foo" (component (type 0)))
)
)
(export (;1;) "foo" (type 0))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,8 @@
package foo:my-dep;
interface my-interface {
record foo {
f: u8,
}
type bar = foo;
}

View File

@@ -0,0 +1,5 @@
package foo:foo;
world foo {
export foo:my-dep/my-interface;
}

View File

@@ -0,0 +1,5 @@
package foo:foo;
world foo {
export foo:my-dep/my-interface;
}

View File

@@ -0,0 +1,21 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) u32)
(export (;1;) "type" (type (eq 0)))
(export (;2;) "world" (type (eq 1)))
(type (;3;) (record (field "variant" 2)))
(export (;4;) "record" (type (eq 3)))
)
)
(export (;0;) "foo:foo/interface" (instance (type 0)))
)
)
(export (;1;) "interface" (type 0))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,10 @@
package foo:foo;
interface %interface {
type %type = u32;
type %world = %type;
record %record {
%variant: %world,
}
}

View File

@@ -0,0 +1,12 @@
package foo:foo;
interface %interface {
type %type = u32;
type %world = %type;
record %record {
%variant: %world,
}
}

View File

@@ -0,0 +1,141 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (record (field "f" u8)))
(export (;1;) "single" (type (eq 0)))
(type (;2;) (record (field "a" u32) (field "b" u32)))
(export (;3;) "scalars" (type (eq 2)))
(type (;4;) (flags "a" "b" "c" "d" "e" "f" "g" "h" "i"))
(export (;5;) "really-flags" (type (eq 4)))
(type (;6;) (record (field "a" 3) (field "b" u32) (field "c" 1) (field "d" string) (field "e" 5)))
(export (;7;) "aggregates" (type (eq 6)))
(type (;8;) s32)
(export (;9;) "int-typedef" (type (eq 8)))
(type (;10;) (tuple 9))
(export (;11;) "tuple-typedef2" (type (eq 10)))
(type (;12;) (tuple char u32))
(type (;13;) (func (param "x" 12)))
(export (;0;) "tuple-arg" (func (type 13)))
(type (;14;) (func (result 12)))
(export (;1;) "tuple-result" (func (type 14)))
(type (;15;) (func (param "x" 1)))
(export (;2;) "single-arg" (func (type 15)))
(type (;16;) (func (result 1)))
(export (;3;) "single-result" (func (type 16)))
(type (;17;) (func (param "x" 3)))
(export (;4;) "scalar-arg" (func (type 17)))
(type (;18;) (func (result 3)))
(export (;5;) "scalar-result" (func (type 18)))
(type (;19;) (func (param "x" 5)))
(export (;6;) "flags-arg" (func (type 19)))
(type (;20;) (func (result 5)))
(export (;7;) "flags-result" (func (type 20)))
(type (;21;) (func (param "x" 7)))
(export (;8;) "aggregate-arg" (func (type 21)))
(type (;22;) (func (result 7)))
(export (;9;) "aggregate-result" (func (type 22)))
(type (;23;) (func (param "e" 11) (result s32)))
(export (;10;) "typedef-inout" (func (type 23)))
)
)
(export (;0;) "foo:records/records" (instance (type 0)))
)
)
(export (;1;) "records" (type 0))
(type (;2;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (record (field "f" u8)))
(export (;1;) "single" (type (eq 0)))
(type (;2;) (record (field "a" u32) (field "b" u32)))
(export (;3;) "scalars" (type (eq 2)))
(type (;4;) (flags "a" "b" "c" "d" "e" "f" "g" "h" "i"))
(export (;5;) "really-flags" (type (eq 4)))
(type (;6;) (record (field "a" 3) (field "b" u32) (field "c" 1) (field "d" string) (field "e" 5)))
(export (;7;) "aggregates" (type (eq 6)))
(type (;8;) s32)
(export (;9;) "int-typedef" (type (eq 8)))
(type (;10;) (tuple 9))
(export (;11;) "tuple-typedef2" (type (eq 10)))
(type (;12;) (tuple char u32))
(type (;13;) (func (param "x" 12)))
(export (;0;) "tuple-arg" (func (type 13)))
(type (;14;) (func (result 12)))
(export (;1;) "tuple-result" (func (type 14)))
(type (;15;) (func (param "x" 1)))
(export (;2;) "single-arg" (func (type 15)))
(type (;16;) (func (result 1)))
(export (;3;) "single-result" (func (type 16)))
(type (;17;) (func (param "x" 3)))
(export (;4;) "scalar-arg" (func (type 17)))
(type (;18;) (func (result 3)))
(export (;5;) "scalar-result" (func (type 18)))
(type (;19;) (func (param "x" 5)))
(export (;6;) "flags-arg" (func (type 19)))
(type (;20;) (func (result 5)))
(export (;7;) "flags-result" (func (type 20)))
(type (;21;) (func (param "x" 7)))
(export (;8;) "aggregate-arg" (func (type 21)))
(type (;22;) (func (result 7)))
(export (;9;) "aggregate-result" (func (type 22)))
(type (;23;) (func (param "e" 11) (result s32)))
(export (;10;) "typedef-inout" (func (type 23)))
)
)
(import "foo:records/records" (instance (;0;) (type 0)))
(type (;1;)
(instance
(type (;0;) (record (field "f" u8)))
(export (;1;) "single" (type (eq 0)))
(type (;2;) (record (field "a" u32) (field "b" u32)))
(export (;3;) "scalars" (type (eq 2)))
(type (;4;) (flags "a" "b" "c" "d" "e" "f" "g" "h" "i"))
(export (;5;) "really-flags" (type (eq 4)))
(type (;6;) (record (field "a" 3) (field "b" u32) (field "c" 1) (field "d" string) (field "e" 5)))
(export (;7;) "aggregates" (type (eq 6)))
(type (;8;) s32)
(export (;9;) "int-typedef" (type (eq 8)))
(type (;10;) (tuple 9))
(export (;11;) "tuple-typedef2" (type (eq 10)))
(type (;12;) (tuple char u32))
(type (;13;) (func (param "x" 12)))
(export (;0;) "tuple-arg" (func (type 13)))
(type (;14;) (func (result 12)))
(export (;1;) "tuple-result" (func (type 14)))
(type (;15;) (func (param "x" 1)))
(export (;2;) "single-arg" (func (type 15)))
(type (;16;) (func (result 1)))
(export (;3;) "single-result" (func (type 16)))
(type (;17;) (func (param "x" 3)))
(export (;4;) "scalar-arg" (func (type 17)))
(type (;18;) (func (result 3)))
(export (;5;) "scalar-result" (func (type 18)))
(type (;19;) (func (param "x" 5)))
(export (;6;) "flags-arg" (func (type 19)))
(type (;20;) (func (result 5)))
(export (;7;) "flags-result" (func (type 20)))
(type (;21;) (func (param "x" 7)))
(export (;8;) "aggregate-arg" (func (type 21)))
(type (;22;) (func (result 7)))
(export (;9;) "aggregate-result" (func (type 22)))
(type (;23;) (func (param "e" 11) (result s32)))
(export (;10;) "typedef-inout" (func (type 23)))
)
)
(export (;1;) "foo:records/records" (instance (type 1)))
)
)
(export (;0;) "foo:records/records-world" (component (type 0)))
)
)
(export (;3;) "records-world" (type 2))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,63 @@
package foo:records;
interface records {
record single {
f: u8,
}
record scalars {
a: u32,
b: u32,
}
flags really-flags {
a,
b,
c,
d,
e,
f,
g,
h,
i,
}
record aggregates {
a: scalars,
b: u32,
c: single,
d: string,
e: really-flags,
}
type int-typedef = s32;
type tuple-typedef2 = tuple<int-typedef>;
tuple-arg: func(x: tuple<char, u32>);
tuple-result: func() -> tuple<char, u32>;
single-arg: func(x: single);
single-result: func() -> single;
scalar-arg: func(x: scalars);
scalar-result: func() -> scalars;
flags-arg: func(x: really-flags);
flags-result: func() -> really-flags;
aggregate-arg: func(x: aggregates);
aggregate-result: func() -> aggregates;
typedef-inout: func(e: tuple-typedef2) -> s32;
}
world records-world {
import records;
export records;
}

View File

@@ -0,0 +1,64 @@
package foo:records;
interface records {
record single {
f: u8,
}
record scalars {
a: u32,
b: u32,
}
flags really-flags {
a,
b,
c,
d,
e,
f,
g,
h,
i,
}
record aggregates {
a: scalars,
b: u32,
c: single,
d: string,
e: really-flags,
}
type int-typedef = s32;
type tuple-typedef2 = tuple<int-typedef>;
tuple-arg: func(x: tuple<char, u32>);
tuple-result: func() -> tuple<char, u32>;
single-arg: func(x: single);
single-result: func() -> single;
scalar-arg: func(x: scalars);
scalar-result: func() -> scalars;
flags-arg: func(x: really-flags);
flags-result: func() -> really-flags;
aggregate-arg: func(x: aggregates);
aggregate-result: func() -> aggregates;
typedef-inout: func(e: tuple-typedef2) -> s32;
}
world records-world {
import records;
export records;
}

View File

@@ -0,0 +1,63 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (record (field "s" string)))
(export (;1;) "r" (type (eq 0)))
(type (;2;) (variant (case "s" string)))
(export (;3;) "v" (type (eq 2)))
(type (;4;) (record (field "s" u32)))
(export (;5;) "r-no-string" (type (eq 4)))
(type (;6;) (variant (case "s" u32)))
(export (;7;) "v-no-string" (type (eq 6)))
(type (;8;) (func (param "x" 1)))
(export (;0;) "a" (func (type 8)))
(type (;9;) (func (param "x" 3)))
(export (;1;) "b" (func (type 9)))
(type (;10;) (func (param "x" 5)))
(export (;2;) "c" (func (type 10)))
(type (;11;) (func (param "x" 7)))
(export (;3;) "d" (func (type 11)))
)
)
(export (;0;) "foo:foo/foo" (instance (type 0)))
)
)
(export (;1;) "foo" (type 0))
(type (;2;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (record (field "s" string)))
(export (;1;) "r" (type (eq 0)))
(type (;2;) (variant (case "s" string)))
(export (;3;) "v" (type (eq 2)))
(type (;4;) (record (field "s" u32)))
(export (;5;) "r-no-string" (type (eq 4)))
(type (;6;) (variant (case "s" u32)))
(export (;7;) "v-no-string" (type (eq 6)))
(type (;8;) (func (param "x" 1)))
(export (;0;) "a" (func (type 8)))
(type (;9;) (func (param "x" 3)))
(export (;1;) "b" (func (type 9)))
(type (;10;) (func (param "x" 5)))
(export (;2;) "c" (func (type 10)))
(type (;11;) (func (param "x" 7)))
(export (;3;) "d" (func (type 11)))
)
)
(import "foo:foo/foo" (instance (;0;) (type 0)))
)
)
(export (;0;) "foo:foo/foo-world" (component (type 0)))
)
)
(export (;3;) "foo-world" (type 2))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,28 @@
package foo:foo;
interface foo {
a: func(x: r);
b: func(x: v);
c: func(x: r-no-string);
d: func(x: v-no-string);
record r {
s: string,
}
variant v {
s(string),
}
record r-no-string {
s: u32,
}
variant v-no-string {
s(u32),
}
}
world foo-world {
import foo;
}

View File

@@ -0,0 +1,31 @@
package foo:foo;
interface foo {
record r {
s: string,
}
variant v {
s(string),
}
record r-no-string {
s: u32,
}
variant v-no-string {
s(u32),
}
a: func(x: r);
b: func(x: v);
c: func(x: r-no-string);
d: func(x: v-no-string);
}
world foo-world {
import foo;
}

View File

@@ -0,0 +1,192 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(export (;0;) "bar" (type (sub resource)))
(export (;1;) "t" (type (eq 0)))
(type (;2;) (own 0))
(export (;3;) "t2" (type (eq 2)))
(type (;4;) (own 0))
(type (;5;) (func (result 4)))
(export (;0;) "[constructor]bar" (func (type 5)))
(type (;6;) (func))
(export (;1;) "[static]bar.a" (func (type 6)))
(type (;7;) (borrow 0))
(type (;8;) (func (param "self" 7)))
(export (;2;) "[method]bar.b" (func (type 8)))
(type (;9;) (func (param "x" 4) (result 4)))
(export (;3;) "a" (func (type 9)))
)
)
(export (;0;) "foo:bar/foo" (instance (type 0)))
)
)
(export (;1;) "foo" (type 0))
(type (;2;)
(component
(type (;0;)
(instance
(export (;0;) "bar" (type (sub resource)))
(export (;1;) "t" (type (eq 0)))
(type (;2;) (own 0))
(export (;3;) "t2" (type (eq 2)))
)
)
(import "foo:bar/foo" (instance (;0;) (type 0)))
(alias export 0 "bar" (type (;1;)))
(alias export 0 "t" (type (;2;)))
(type (;3;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "bar" (type (eq 0)))
(alias outer 1 2 (type (;2;)))
(export (;3;) "t" (type (eq 2)))
(type (;4;) (own 1))
(type (;5;) (func (param "x" 4) (result 4)))
(export (;0;) "a" (func (type 5)))
(type (;6;) (own 3))
(type (;7;) (func (result 6)))
(export (;1;) "b" (func (type 7)))
)
)
(export (;1;) "foo:bar/baz" (instance (type 3)))
)
)
(export (;3;) "baz" (type 2))
(type (;4;)
(component
(type (;0;)
(instance
(export (;0;) "a" (type (sub resource)))
(type (;1;) (own 0))
(type (;2;) (func (param "a1" 1) (param "a2" 1) (result 1)))
(export (;0;) "b" (func (type 2)))
(type (;3;) (list 1))
(type (;4;) (func (result 3)))
(export (;1;) "c" (func (type 4)))
)
)
(export (;0;) "foo:bar/implicit-own-handles" (instance (type 0)))
)
)
(export (;5;) "implicit-own-handles" (type 4))
(type (;6;)
(component
(type (;0;)
(instance
(export (;0;) "a" (type (sub resource)))
(export (;1;) "b" (type (sub resource)))
(export (;2;) "c" (type (sub resource)))
(type (;3;) (own 0))
(type (;4;) (list 3))
(type (;5;) (func (param "a" 4) (result 3)))
(export (;0;) "[constructor]a" (func (type 5)))
(type (;6;) (own 1))
(type (;7;) (list 6))
(type (;8;) (func (param "a" 7) (param "b" 6) (result 6)))
(export (;1;) "[constructor]b" (func (type 8)))
(type (;9;) (own 2))
(type (;10;) (func (param "a" 9) (result 9)))
(export (;2;) "[static]c.a" (func (type 10)))
)
)
(export (;0;) "foo:bar/implicit-own-handles2" (instance (type 0)))
)
)
(export (;7;) "implicit-own-handles2" (type 6))
(type (;8;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(export (;0;) "a" (type (sub resource)))
(type (;1;) (own 0))
(type (;2;) (func (result 1)))
(export (;0;) "[constructor]a" (func (type 2)))
(type (;3;) (func))
(export (;1;) "[static]a.b" (func (type 3)))
(type (;4;) (borrow 0))
(type (;5;) (func (param "self" 4)))
(export (;2;) "[method]a.c" (func (type 5)))
)
)
(import "anon" (instance (;0;) (type 0)))
(type (;1;)
(instance
(export (;0;) "bar" (type (sub resource)))
(export (;1;) "t" (type (eq 0)))
(type (;2;) (own 0))
(export (;3;) "t2" (type (eq 2)))
(type (;4;) (own 0))
(type (;5;) (func (result 4)))
(export (;0;) "[constructor]bar" (func (type 5)))
(type (;6;) (func))
(export (;1;) "[static]bar.a" (func (type 6)))
(type (;7;) (borrow 0))
(type (;8;) (func (param "self" 7)))
(export (;2;) "[method]bar.b" (func (type 8)))
(type (;9;) (func (param "x" 4) (result 4)))
(export (;3;) "a" (func (type 9)))
)
)
(import "foo:bar/foo" (instance (;1;) (type 1)))
(alias export 1 "bar" (type (;2;)))
(alias export 1 "t" (type (;3;)))
(type (;4;)
(instance
(alias outer 1 2 (type (;0;)))
(export (;1;) "bar" (type (eq 0)))
(alias outer 1 3 (type (;2;)))
(export (;3;) "t" (type (eq 2)))
(type (;4;) (own 1))
(type (;5;) (func (param "x" 4) (result 4)))
(export (;0;) "a" (func (type 5)))
(type (;6;) (own 3))
(type (;7;) (func (result 6)))
(export (;1;) "b" (func (type 7)))
)
)
(import "foo:bar/baz" (instance (;2;) (type 4)))
(alias export 2 "bar" (type (;5;)))
(import "bar" (type (;6;) (eq 5)))
(import "a" (type (;7;) (sub resource)))
(import "b" (type (;8;) (sub resource)))
(type (;9;) (own 7))
(type (;10;) (func (result 9)))
(import "[constructor]a" (func (;0;) (type 10)))
(type (;11;) (own 8))
(type (;12;) (result 11 (error string)))
(type (;13;) (func (result 12)))
(import "[constructor]b" (func (;1;) (type 13)))
(export (;2;) "x" (func (type 10)))
(type (;14;) (own 6))
(type (;15;) (func (result 14)))
(export (;3;) "y" (func (type 15)))
)
)
(export (;0;) "foo:bar/some-world" (component (type 0)))
)
)
(export (;9;) "some-world" (type 8))
(type (;10;)
(component
(type (;0;)
(component
(import "a" (type (;0;) (sub resource)))
(type (;1;) (own 0))
(type (;2;) (list 1))
(type (;3;) (func (param "a" 2) (param "b" 2) (result 1)))
(import "[constructor]a" (func (;0;) (type 3)))
)
)
(export (;0;) "foo:bar/implicit-own-handles3" (component (type 0)))
)
)
(export (;11;) "implicit-own-handles3" (type 10))
(@custom "package-docs" "\01{\22worlds\22:{\22implicit-own-handles3\22:{\22types\22:{\22a\22:{\22docs\22:\22there should only be one `list` type despite there looking like two\5cnlist types here\22}}}},\22interfaces\22:{\22implicit-own-handles2\22:{\22types\22:{\22a\22:{\22docs\22:\22the `own` return and list param should be the same `own`\22},\22b\22:{\22docs\22:\22same as above, even when the `list<b>` implicitly-defined `own` comes\5cnbefore an explicitly defined `own`\22},\22c\22:{\22docs\22:\22same as the above, the `own` argument should have the same type as the\5cnreturn value\22}}}}}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,80 @@
package foo:bar;
interface foo {
resource bar {
constructor();
a: static func();
b: func();
}
a: func(x: bar) -> bar;
type t = bar;
type t2 = own<bar>;
}
interface baz {
use foo.{bar,t};
a: func(x: bar) -> bar;
b: func() -> t;
}
world some-world {
use baz.{bar};
resource a {
constructor();
}
resource b {
constructor() -> result<b, string>;
}
export x: func() -> a;
export y: func() -> bar;
import anon: interface {
resource a {
constructor();
b: static func();
c: func();
}
}
}
interface implicit-own-handles {
resource a;
b: func(a1: a, a2: a) -> own<a>;
c: func() -> list<own<a>>;
}
interface implicit-own-handles2 {
/// the `own` return and list param should be the same `own`
resource a {
constructor(a: list<a>);
}
/// same as above, even when the `list<b>` implicitly-defined `own` comes
/// before an explicitly defined `own`
resource b {
constructor(a: list<b>, b: own<b>);
}
/// same as the above, the `own` argument should have the same type as the
/// return value
resource c {
a: static func(a: own<c>) -> c;
}
}
world implicit-own-handles3 {
/// there should only be one `list` type despite there looking like two
/// list types here
resource a {
constructor(a: list<a>, b: list<own<a>>);
}
}

View File

@@ -0,0 +1,81 @@
package foo:bar;
interface foo {
resource bar {
constructor();
a: static func();
b: func();
}
type t = bar;
type t2 = own<bar>;
a: func(x: bar) -> bar;
}
interface baz {
use foo.{bar, t};
a: func(x: bar) -> bar;
b: func() -> t;
}
interface implicit-own-handles {
resource a;
b: func(a1: a, a2: a) -> a;
c: func() -> list<a>;
}
interface implicit-own-handles2 {
/// the `own` return and list param should be the same `own`
resource a {
constructor(a: list<a>);
}
/// same as above, even when the `list<b>` implicitly-defined `own` comes
/// before an explicitly defined `own`
resource b {
constructor(a: list<b>, b: b);
}
/// same as the above, the `own` argument should have the same type as the
/// return value
resource c {
a: static func(a: c) -> c;
}
}
world some-world {
import anon: interface {
resource a {
constructor();
b: static func();
c: func();
}
}
import foo;
import baz;
use baz.{bar};
resource a {
constructor();
}
resource b {
constructor() -> result<b, string>;
}
export x: func() -> a;
export y: func() -> bar;
}
world implicit-own-handles3 {
/// there should only be one `list` type despite there looking like two
/// list types here
resource a {
constructor(a: list<a>, b: list<a>);
}
}

View File

@@ -0,0 +1,26 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) u8)
(export (;1;) "some-type" (type (eq 0)))
)
)
(import "foo:some-dep/types" (instance (;0;) (type 0)))
(alias export 0 "some-type" (type (;1;)))
(type (;2;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "some-type" (type (eq 0)))
)
)
(export (;1;) "foo:foo/foo" (instance (type 2)))
)
)
(export (;1;) "foo" (type 0))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,5 @@
package foo:some-dep;
interface types {
type some-type = u8;
}

View File

@@ -0,0 +1,4 @@
package foo:foo;
interface foo {
use foo:some-dep/types.{some-type};
}

View File

@@ -0,0 +1,6 @@
package foo:foo;
interface foo {
use foo:some-dep/types.{some-type};
}

View File

@@ -0,0 +1,24 @@
(component
(type (;0;)
(component
(type (;0;)
(instance)
)
(export (;0;) "foo:foo/bar" (instance (type 0)))
)
)
(export (;1;) "bar" (type 0))
(type (;2;)
(component
(type (;0;)
(instance)
)
(export (;0;) "foo:foo/foo" (instance (type 0)))
)
)
(export (;3;) "foo" (type 2))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1 @@
interface bar {}

View File

@@ -0,0 +1,3 @@
package foo:foo;
interface foo {}

View File

@@ -0,0 +1,8 @@
package foo:foo;
interface bar {
}
interface foo {
}

View File

@@ -0,0 +1,40 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (enum "info" "debug"))
(export (;1;) "level" (type (eq 0)))
)
)
(export (;0;) "foo:foo/types" (instance (type 0)))
)
)
(export (;1;) "types" (type 0))
(type (;2;)
(component
(type (;0;)
(instance
(type (;0;) (enum "info" "debug"))
(export (;1;) "level" (type (eq 0)))
)
)
(import "foo:foo/types" (instance (;0;) (type 0)))
(alias export 0 "level" (type (;1;)))
(type (;2;)
(instance
(alias outer 1 1 (type (;0;)))
(export (;1;) "level" (type (eq 0)))
(type (;2;) (func (param "level" 1) (param "msg" string)))
(export (;0;) "log" (func (type 2)))
)
)
(export (;1;) "foo:foo/console" (instance (type 2)))
)
)
(export (;3;) "console" (type 2))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,13 @@
package foo:foo;
interface types {
enum level {
info,
debug,
}
}
interface console {
use types.{level};
log: func(level: level, msg: string);
}

View File

@@ -0,0 +1,15 @@
package foo:foo;
interface types {
enum level {
info,
debug,
}
}
interface console {
use types.{level};
log: func(level: level, msg: string);
}

View File

@@ -0,0 +1,35 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (func (param "arg" string)))
(export (;0;) "log" (func (type 0)))
)
)
(export (;0;) "foo:foo/console" (instance (type 0)))
)
)
(export (;1;) "console" (type 0))
(type (;2;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (func (param "arg" string)))
(export (;0;) "log" (func (type 0)))
)
)
(import "foo:foo/console" (instance (;0;) (type 0)))
)
)
(export (;0;) "foo:foo/the-world" (component (type 0)))
)
)
(export (;3;) "the-world" (type 2))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,9 @@
package foo:foo;
world the-world {
import console;
}
interface console {
log: func(arg: string);
}

View File

@@ -0,0 +1,9 @@
package foo:foo;
interface console {
log: func(arg: string);
}
world the-world {
import console;
}

View File

@@ -0,0 +1,18 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (func (result "a" u32)))
(export (;0;) "a" (func (type 0)))
)
)
(export (;0;) "foo:foo/foo" (instance (type 0)))
)
)
(export (;1;) "foo" (type 0))
(@custom "package-docs" "\00{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,51 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) u8)
(export (;1;) "a" (type (eq 0)))
(export (;2;) "b" (type (eq 1)))
(type (;3;) (func (param "a" 1) (result 2)))
(export (;0;) "f" (func (type 3)))
)
)
(export (;0;) "foo:foo/foo" (instance (type 0)))
)
)
(export (;1;) "foo" (type 0))
(type (;2;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) u8)
(export (;1;) "a" (type (eq 0)))
(export (;2;) "b" (type (eq 1)))
(type (;3;) (func (param "a" 1) (result 2)))
(export (;0;) "f" (func (type 3)))
)
)
(import "foo:foo/foo" (instance (;0;) (type 0)))
(type (;1;)
(instance
(type (;0;) u8)
(export (;1;) "a" (type (eq 0)))
(export (;2;) "b" (type (eq 1)))
(type (;3;) (func (param "a" 1) (result 2)))
(export (;0;) "f" (func (type 3)))
)
)
(export (;1;) "foo:foo/foo" (instance (type 1)))
)
)
(export (;0;) "foo:foo/my-world" (component (type 0)))
)
)
(export (;3;) "my-world" (type 2))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

View File

@@ -0,0 +1,13 @@
package foo:foo;
interface foo {
type a = u8;
type b = a;
f: func(a: a) -> b;
}
world my-world {
import foo;
export foo;
}

View File

@@ -0,0 +1,15 @@
package foo:foo;
interface foo {
type a = u8;
type b = a;
f: func(a: a) -> b;
}
world my-world {
import foo;
export foo;
}

View File

@@ -0,0 +1,41 @@
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (flags "b"))
(export (;1;) "a" (type (eq 0)))
(export (;2;) "b" (type (eq 1)))
(type (;3;) (func (result 2)))
(export (;0;) "f" (func (type 3)))
)
)
(export (;0;) "foo:foo/foo" (instance (type 0)))
)
)
(export (;1;) "foo" (type 0))
(type (;2;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (flags "b"))
(export (;1;) "a" (type (eq 0)))
(export (;2;) "b" (type (eq 1)))
(type (;3;) (func (result 2)))
(export (;0;) "f" (func (type 3)))
)
)
(export (;0;) "foo:foo/foo" (instance (type 0)))
)
)
(export (;0;) "foo:foo/my-world" (component (type 0)))
)
)
(export (;3;) "my-world" (type 2))
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)

Some files were not shown because too many files have changed in this diff Show More