wit-component 0.246.2

Tooling for working with `*.wit` and component files together.
Documentation
(component
  (type $ty-test:test/test (;0;)
    (instance
      (type (;0;) (func (param "v" s32) (result s32)))
      (export (;0;) "foo" (func (type 0)))
    )
  )
  (import "test:test/test" (instance $test:test/test (;0;) (type $ty-test:test/test)))
  (core module $main (;0;)
    (table (;0;) 4 funcref)
    (memory (;0;) 17)
    (global (;0;) (mut i32) i32.const 1048576)
    (global (;1;) (mut i32) i32.const 1048576)
    (global (;2;) (mut i32) i32.const 0)
    (global (;3;) i32 i32.const 1048688)
    (global (;4;) i32 i32.const 4)
    (global (;5;) (mut i32) i32.const 1048688)
    (global (;6;) (mut i32) i32.const 1114112)
    (export "__stack_pointer" (global 0))
    (export "__stack_high" (global 1))
    (export "__stack_low" (global 2))
    (export "foo:memory_base" (global 3))
    (export "foo:table_base" (global 4))
    (export "__heap_base" (global 5))
    (export "__heap_end" (global 6))
    (export "__indirect_function_table" (table 0))
    (export "memory" (memory 0))
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
    )
  )
  (core module $foo (;1;)
    (@dylink.0
      (mem-info (memory 0 4))
    )
    (type (;0;) (func (param i32) (result i32)))
    (import "test:test/test" "foo" (func $import_foo (;0;) (type 0)))
    (global $what (;0;) i32 i32.const 42)
    (export "test:test/test#foo" (func $foo))
    (export "bar" (func $foo))
    (export "baz" (func $foo))
    (export "what" (global $what))
    (func $foo (;1;) (type 0) (param i32) (result i32)
      unreachable
    )
  )
  (core module $__init (;2;)
    (type (;0;) (func))
    (type (;1;) (func (param i32)))
    (type (;2;) (func (param i32) (result i32)))
    (type (;3;) (func (param i32) (result i32)))
    (type (;4;) (func (param i32) (result i32)))
    (import "env" "memory" (memory (;0;) 0))
    (import "env" "__indirect_function_table" (table (;0;) 0 funcref))
    (import "env" "foo:memory_base" (global (;0;) i32))
    (import "foo" "what" (global (;1;) i32))
    (import "foo" "bar" (func (;0;) (type 2)))
    (import "foo" "baz" (func (;1;) (type 3)))
    (import "foo" "test:test/test#foo" (func (;2;) (type 4)))
    (start 3)
    (elem (;0;) (i32.const 1) func 0 1 2)
    (elem (;1;) (i32.const 4) func)
    (func (;3;) (type 0)
      i32.const 1048656
      global.get 0
      global.get 1
      i32.add
      i32.store
    )
    (data (;0;) (i32.const 1048576) "foo\00bar\00baz\00test:test/test#foo\00\00what\03\00\00\00\04\00\10\00\01\00\00\00\03\00\00\00\08\00\10\00\02\00\00\00\12\00\00\00\0c\00\10\00\03\00\00\00\04\00\00\00 \00\10\00\00\00\00\00\03\00\00\00\00\00\10\00\04\00\00\00$\00\10\00\01\00\00\00T\00\10\00")
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
    )
  )
  (core instance $main (;0;) (instantiate $main))
  (alias core export $main "memory" (core memory $memory (;0;)))
  (alias export $test:test/test "foo" (func $foo (;0;)))
  (core func $foo (;0;) (canon lower (func $foo)))
  (core instance $test:test/test (;1;)
    (export "foo" (func $foo))
  )
  (core instance $foo (;2;) (instantiate $foo
      (with "test:test/test" (instance $test:test/test))
    )
  )
  (core instance $__init (;3;) (instantiate $__init
      (with "env" (instance $main))
      (with "foo" (instance $foo))
    )
  )
  (type (;1;) (func (param "v" s32) (result s32)))
  (alias core export $foo "test:test/test#foo" (core func $test:test/test#foo (;1;)))
  (func $"#func1 foo" (@name "foo") (;1;) (type 1) (canon lift (core func $test:test/test#foo)))
  (component $test:test/test-shim-component (;0;)
    (type (;0;) (func (param "v" s32) (result s32)))
    (import "import-func-foo" (func (;0;) (type 0)))
    (type (;1;) (func (param "v" s32) (result s32)))
    (export (;1;) "foo" (func 0) (func (type 1)))
  )
  (instance $test:test/test-shim-instance (;1;) (instantiate $test:test/test-shim-component
      (with "import-func-foo" (func $"#func1 foo"))
    )
  )
  (export $"#instance2 test:test/test" (@name "test:test/test") (;2;) "test:test/test" (instance $test:test/test-shim-instance))
  (@producers
    (processed-by "wit-component" "$CARGO_PKG_VERSION")
  )
)