wit-component 0.246.2

Tooling for working with `*.wit` and component files together.
Documentation
(component
  (type $ty-foo:foo/foo (;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))
      (export (;0;) "a" (func (type 8)))
      (type (;9;) (list string))
      (type (;10;) (func (param "x" 9)))
      (export (;1;) "b" (func (type 10)))
      (type (;11;) (func (param "x" 1)))
      (export (;2;) "c" (func (type 11)))
      (type (;12;) (func (param "x" 3)))
      (export (;3;) "d" (func (type 12)))
      (type (;13;) (func (param "x" 5)))
      (export (;4;) "e" (func (type 13)))
      (type (;14;) (func (param "x" 7)))
      (export (;5;) "f" (func (type 14)))
      (type (;15;) (list 1))
      (type (;16;) (func (param "x" 15)))
      (export (;6;) "g" (func (type 16)))
      (type (;17;) (list 3))
      (type (;18;) (func (param "x" 17)))
      (export (;7;) "h" (func (type 18)))
      (type (;19;) (list u32))
      (type (;20;) (func (param "x" 19)))
      (export (;8;) "i" (func (type 20)))
      (type (;21;) (func (param "x" u32)))
      (export (;9;) "j" (func (type 21)))
      (type (;22;) (tuple u32 u32))
      (type (;23;) (func (result 22)))
      (export (;10;) "k" (func (type 23)))
      (type (;24;) (func (result string)))
      (export (;11;) "l" (func (type 24)))
      (type (;25;) (func (result 19)))
      (export (;12;) "m" (func (type 25)))
      (type (;26;) (func (result u32)))
      (export (;13;) "n" (func (type 26)))
      (type (;27;) (func (result 3)))
      (export (;14;) "o" (func (type 27)))
      (type (;28;) (list 7))
      (type (;29;) (func (result 28)))
      (export (;15;) "p" (func (type 29)))
    )
  )
  (import "foo:foo/foo" (instance $foo:foo/foo (;0;) (type $ty-foo:foo/foo)))
  (core module $main (;0;)
    (type (;0;) (func))
    (type (;1;) (func (param i32 i32)))
    (type (;2;) (func (param i32 i32 i32)))
    (type (;3;) (func (param i32)))
    (type (;4;) (func (result i32)))
    (type (;5;) (func (param i32 i32 i32 i32) (result i32)))
    (import "foo:foo/foo" "a" (func (;0;) (type 0)))
    (import "foo:foo/foo" "b" (func (;1;) (type 1)))
    (import "foo:foo/foo" "c" (func (;2;) (type 1)))
    (import "foo:foo/foo" "d" (func (;3;) (type 2)))
    (import "foo:foo/foo" "e" (func (;4;) (type 3)))
    (import "foo:foo/foo" "f" (func (;5;) (type 1)))
    (import "foo:foo/foo" "g" (func (;6;) (type 1)))
    (import "foo:foo/foo" "h" (func (;7;) (type 1)))
    (import "foo:foo/foo" "i" (func (;8;) (type 1)))
    (import "foo:foo/foo" "j" (func (;9;) (type 3)))
    (import "foo:foo/foo" "k" (func (;10;) (type 3)))
    (import "foo:foo/foo" "l" (func (;11;) (type 3)))
    (import "foo:foo/foo" "m" (func (;12;) (type 3)))
    (import "foo:foo/foo" "n" (func (;13;) (type 4)))
    (import "foo:foo/foo" "o" (func (;14;) (type 3)))
    (import "foo:foo/foo" "p" (func (;15;) (type 3)))
    (memory (;0;) 1)
    (export "memory" (memory 0))
    (export "cabi_realloc" (func 16))
    (func (;16;) (type 5) (param i32 i32 i32 i32) (result i32)
      unreachable
    )
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
      (processed-by "my-fake-bindgen" "123.45")
    )
  )
  (core module $wit-component-shim-module (;1;)
    (type (;0;) (func (param i32 i32)))
    (type (;1;) (func (param i32 i32 i32)))
    (type (;2;) (func (param i32)))
    (table (;0;) 11 11 funcref)
    (export "0" (func $indirect-foo:foo/foo-b))
    (export "1" (func $indirect-foo:foo/foo-c))
    (export "2" (func $indirect-foo:foo/foo-d))
    (export "3" (func $indirect-foo:foo/foo-g))
    (export "4" (func $indirect-foo:foo/foo-h))
    (export "5" (func $indirect-foo:foo/foo-i))
    (export "6" (func $indirect-foo:foo/foo-k))
    (export "7" (func $indirect-foo:foo/foo-l))
    (export "8" (func $indirect-foo:foo/foo-m))
    (export "9" (func $indirect-foo:foo/foo-o))
    (export "10" (func $indirect-foo:foo/foo-p))
    (export "$imports" (table 0))
    (func $indirect-foo:foo/foo-b (;0;) (type 0) (param i32 i32)
      local.get 0
      local.get 1
      i32.const 0
      call_indirect (type 0)
    )
    (func $indirect-foo:foo/foo-c (;1;) (type 0) (param i32 i32)
      local.get 0
      local.get 1
      i32.const 1
      call_indirect (type 0)
    )
    (func $indirect-foo:foo/foo-d (;2;) (type 1) (param i32 i32 i32)
      local.get 0
      local.get 1
      local.get 2
      i32.const 2
      call_indirect (type 1)
    )
    (func $indirect-foo:foo/foo-g (;3;) (type 0) (param i32 i32)
      local.get 0
      local.get 1
      i32.const 3
      call_indirect (type 0)
    )
    (func $indirect-foo:foo/foo-h (;4;) (type 0) (param i32 i32)
      local.get 0
      local.get 1
      i32.const 4
      call_indirect (type 0)
    )
    (func $indirect-foo:foo/foo-i (;5;) (type 0) (param i32 i32)
      local.get 0
      local.get 1
      i32.const 5
      call_indirect (type 0)
    )
    (func $indirect-foo:foo/foo-k (;6;) (type 2) (param i32)
      local.get 0
      i32.const 6
      call_indirect (type 2)
    )
    (func $indirect-foo:foo/foo-l (;7;) (type 2) (param i32)
      local.get 0
      i32.const 7
      call_indirect (type 2)
    )
    (func $indirect-foo:foo/foo-m (;8;) (type 2) (param i32)
      local.get 0
      i32.const 8
      call_indirect (type 2)
    )
    (func $indirect-foo:foo/foo-o (;9;) (type 2) (param i32)
      local.get 0
      i32.const 9
      call_indirect (type 2)
    )
    (func $indirect-foo:foo/foo-p (;10;) (type 2) (param i32)
      local.get 0
      i32.const 10
      call_indirect (type 2)
    )
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
    )
  )
  (core module $wit-component-fixup (;2;)
    (type (;0;) (func (param i32 i32)))
    (type (;1;) (func (param i32 i32 i32)))
    (type (;2;) (func (param i32)))
    (import "" "0" (func (;0;) (type 0)))
    (import "" "1" (func (;1;) (type 0)))
    (import "" "2" (func (;2;) (type 1)))
    (import "" "3" (func (;3;) (type 0)))
    (import "" "4" (func (;4;) (type 0)))
    (import "" "5" (func (;5;) (type 0)))
    (import "" "6" (func (;6;) (type 2)))
    (import "" "7" (func (;7;) (type 2)))
    (import "" "8" (func (;8;) (type 2)))
    (import "" "9" (func (;9;) (type 2)))
    (import "" "10" (func (;10;) (type 2)))
    (import "" "$imports" (table (;0;) 11 11 funcref))
    (elem (;0;) (i32.const 0) func 0 1 2 3 4 5 6 7 8 9 10)
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
    )
  )
  (core instance $wit-component-shim-instance (;0;) (instantiate $wit-component-shim-module))
  (alias export $foo:foo/foo "a" (func $a (;0;)))
  (core func $a (;0;) (canon lower (func $a)))
  (alias core export $wit-component-shim-instance "0" (core func $indirect-foo:foo/foo-b (;1;)))
  (alias core export $wit-component-shim-instance "1" (core func $indirect-foo:foo/foo-c (;2;)))
  (alias core export $wit-component-shim-instance "2" (core func $indirect-foo:foo/foo-d (;3;)))
  (alias export $foo:foo/foo "e" (func $e (;1;)))
  (core func $e (;4;) (canon lower (func $e)))
  (alias export $foo:foo/foo "f" (func $f (;2;)))
  (core func $f (;5;) (canon lower (func $f)))
  (alias core export $wit-component-shim-instance "3" (core func $indirect-foo:foo/foo-g (;6;)))
  (alias core export $wit-component-shim-instance "4" (core func $indirect-foo:foo/foo-h (;7;)))
  (alias core export $wit-component-shim-instance "5" (core func $indirect-foo:foo/foo-i (;8;)))
  (alias export $foo:foo/foo "j" (func $j (;3;)))
  (core func $j (;9;) (canon lower (func $j)))
  (alias core export $wit-component-shim-instance "6" (core func $indirect-foo:foo/foo-k (;10;)))
  (alias core export $wit-component-shim-instance "7" (core func $indirect-foo:foo/foo-l (;11;)))
  (alias core export $wit-component-shim-instance "8" (core func $indirect-foo:foo/foo-m (;12;)))
  (alias export $foo:foo/foo "n" (func $n (;4;)))
  (core func $n (;13;) (canon lower (func $n)))
  (alias core export $wit-component-shim-instance "9" (core func $indirect-foo:foo/foo-o (;14;)))
  (alias core export $wit-component-shim-instance "10" (core func $indirect-foo:foo/foo-p (;15;)))
  (core instance $foo:foo/foo (;1;)
    (export "a" (func $a))
    (export "b" (func $indirect-foo:foo/foo-b))
    (export "c" (func $indirect-foo:foo/foo-c))
    (export "d" (func $indirect-foo:foo/foo-d))
    (export "e" (func $e))
    (export "f" (func $f))
    (export "g" (func $indirect-foo:foo/foo-g))
    (export "h" (func $indirect-foo:foo/foo-h))
    (export "i" (func $indirect-foo:foo/foo-i))
    (export "j" (func $j))
    (export "k" (func $indirect-foo:foo/foo-k))
    (export "l" (func $indirect-foo:foo/foo-l))
    (export "m" (func $indirect-foo:foo/foo-m))
    (export "n" (func $n))
    (export "o" (func $indirect-foo:foo/foo-o))
    (export "p" (func $indirect-foo:foo/foo-p))
  )
  (core instance $main (;2;) (instantiate $main
      (with "foo:foo/foo" (instance $foo:foo/foo))
    )
  )
  (alias core export $main "memory" (core memory $memory (;0;)))
  (alias core export $wit-component-shim-instance "$imports" (core table $"shim table" (;0;)))
  (alias export $foo:foo/foo "b" (func $b (;5;)))
  (alias core export $main "cabi_realloc" (core func $realloc (;16;)))
  (core func $"#core-func17 indirect-foo:foo/foo-b" (@name "indirect-foo:foo/foo-b") (;17;) (canon lower (func $b) (memory $memory) string-encoding=utf8))
  (alias export $foo:foo/foo "c" (func $c (;6;)))
  (core func $"#core-func18 indirect-foo:foo/foo-c" (@name "indirect-foo:foo/foo-c") (;18;) (canon lower (func $c) (memory $memory) string-encoding=utf8))
  (alias export $foo:foo/foo "d" (func $d (;7;)))
  (core func $"#core-func19 indirect-foo:foo/foo-d" (@name "indirect-foo:foo/foo-d") (;19;) (canon lower (func $d) (memory $memory) string-encoding=utf8))
  (alias export $foo:foo/foo "g" (func $g (;8;)))
  (core func $"#core-func20 indirect-foo:foo/foo-g" (@name "indirect-foo:foo/foo-g") (;20;) (canon lower (func $g) (memory $memory) string-encoding=utf8))
  (alias export $foo:foo/foo "h" (func $h (;9;)))
  (core func $"#core-func21 indirect-foo:foo/foo-h" (@name "indirect-foo:foo/foo-h") (;21;) (canon lower (func $h) (memory $memory) string-encoding=utf8))
  (alias export $foo:foo/foo "i" (func $i (;10;)))
  (core func $"#core-func22 indirect-foo:foo/foo-i" (@name "indirect-foo:foo/foo-i") (;22;) (canon lower (func $i) (memory $memory)))
  (alias export $foo:foo/foo "k" (func $k (;11;)))
  (core func $"#core-func23 indirect-foo:foo/foo-k" (@name "indirect-foo:foo/foo-k") (;23;) (canon lower (func $k) (memory $memory)))
  (alias export $foo:foo/foo "l" (func $l (;12;)))
  (core func $"#core-func24 indirect-foo:foo/foo-l" (@name "indirect-foo:foo/foo-l") (;24;) (canon lower (func $l) (memory $memory) (realloc $realloc) string-encoding=utf8))
  (alias export $foo:foo/foo "m" (func $m (;13;)))
  (core func $"#core-func25 indirect-foo:foo/foo-m" (@name "indirect-foo:foo/foo-m") (;25;) (canon lower (func $m) (memory $memory) (realloc $realloc)))
  (alias export $foo:foo/foo "o" (func $o (;14;)))
  (core func $"#core-func26 indirect-foo:foo/foo-o" (@name "indirect-foo:foo/foo-o") (;26;) (canon lower (func $o) (memory $memory) (realloc $realloc) string-encoding=utf8))
  (alias export $foo:foo/foo "p" (func $p (;15;)))
  (core func $"#core-func27 indirect-foo:foo/foo-p" (@name "indirect-foo:foo/foo-p") (;27;) (canon lower (func $p) (memory $memory) (realloc $realloc)))
  (core instance $fixup-args (;3;)
    (export "$imports" (table $"shim table"))
    (export "0" (func $"#core-func17 indirect-foo:foo/foo-b"))
    (export "1" (func $"#core-func18 indirect-foo:foo/foo-c"))
    (export "2" (func $"#core-func19 indirect-foo:foo/foo-d"))
    (export "3" (func $"#core-func20 indirect-foo:foo/foo-g"))
    (export "4" (func $"#core-func21 indirect-foo:foo/foo-h"))
    (export "5" (func $"#core-func22 indirect-foo:foo/foo-i"))
    (export "6" (func $"#core-func23 indirect-foo:foo/foo-k"))
    (export "7" (func $"#core-func24 indirect-foo:foo/foo-l"))
    (export "8" (func $"#core-func25 indirect-foo:foo/foo-m"))
    (export "9" (func $"#core-func26 indirect-foo:foo/foo-o"))
    (export "10" (func $"#core-func27 indirect-foo:foo/foo-p"))
  )
  (core instance $fixup (;4;) (instantiate $wit-component-fixup
      (with "" (instance $fixup-args))
    )
  )
  (@producers
    (processed-by "wit-component" "$CARGO_PKG_VERSION")
  )
)