wit-component 0.247.0

Tooling for working with `*.wit` and component files together.
Documentation
(component
  (core module $main (;0;)
    (table (;0;) 1 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 1048592)
    (global (;4;) i32 i32.const 1)
    (global (;5;) i32 i32.const 1048608)
    (global (;6;) i32 i32.const 1)
    (global (;7;) (mut i32) i32.const 1048624)
    (global (;8;) (mut i32) i32.const 1114112)
    (export "__stack_pointer" (global 0))
    (export "__stack_high" (global 1))
    (export "__stack_low" (global 2))
    (export "bar:memory_base" (global 3))
    (export "bar:table_base" (global 4))
    (export "foo:memory_base" (global 5))
    (export "foo:table_base" (global 6))
    (export "__heap_base" (global 7))
    (export "__heap_end" (global 8))
    (export "__indirect_function_table" (table 0))
    (export "memory" (memory 0))
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
    )
  )
  (core module $bar (;1;)
    (@dylink.0
      (mem-info (memory 1 4))
      (needed "foo")
    )
    (type (;0;) (func))
    (type (;1;) (func (param i32)))
    (type (;2;) (func (result i32)))
    (import "env" "__memory_base" (global $__memory_base (;0;) i32))
    (import "env" "__table_base" (global $__table_base (;1;) i32))
    (import "GOT.mem" "__stack_high" (global (;2;) (mut i32)))
    (import "GOT.mem" "__stack_low" (global (;3;) (mut i32)))
    (import "env" "memory" (memory (;0;) 1))
    (import "env" "__indirect_function_table" (table (;0;) 0 funcref))
    (export "test:test/test#bar" (func $bar))
    (export "__wasm_apply_data_relocs" (func $__wasm_apply_data_relocs))
    (func $__wasm_apply_data_relocs (;0;) (type 0))
    (func $bar (;1;) (type 0))
  )
  (core module $foo (;2;)
    (@dylink.0
      (mem-info (memory 1 4))
      (needed "bar")
    )
    (type (;0;) (func))
    (type (;1;) (func (param i32)))
    (type (;2;) (func (result i32)))
    (import "env" "__memory_base" (global $__memory_base (;0;) i32))
    (import "env" "__table_base" (global $__table_base (;1;) i32))
    (import "GOT.mem" "__stack_high" (global (;2;) (mut i32)))
    (import "GOT.mem" "__stack_low" (global (;3;) (mut i32)))
    (import "env" "memory" (memory (;0;) 1))
    (import "env" "__indirect_function_table" (table (;0;) 0 funcref))
    (export "__wasm_apply_data_relocs" (func $__wasm_apply_data_relocs))
    (func $__wasm_apply_data_relocs (;0;) (type 0))
  )
  (core module $__init (;3;)
    (type (;0;) (func))
    (type (;1;) (func (param i32)))
    (import "env" "memory" (memory (;0;) 0))
    (import "env" "__indirect_function_table" (table (;0;) 0 funcref))
    (import "bar" "__wasm_apply_data_relocs" (func (;0;) (type 0)))
    (import "foo" "__wasm_apply_data_relocs" (func (;1;) (type 0)))
    (start 2)
    (elem (;0;) (i32.const 1) func)
    (elem (;1;) (i32.const 1) func)
    (func (;2;) (type 0)
      call 0
      call 1
    )
    (data (;0;) (i32.const 1048576) "\00\00\00\00\00\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 core export $main "bar:memory_base" (core global $bar:memory_base (;0;)))
  (alias core export $main "bar:table_base" (core global $bar:table_base (;1;)))
  (alias core export $main "__indirect_function_table" (core table $__indirect_function_table (;0;)))
  (core instance $env (;1;)
    (export "__memory_base" (global $bar:memory_base))
    (export "__table_base" (global $bar:table_base))
    (export "memory" (memory $memory))
    (export "__indirect_function_table" (table $__indirect_function_table))
  )
  (alias core export $main "__stack_high" (core global $__stack_high (;2;)))
  (alias core export $main "__stack_low" (core global $__stack_low (;3;)))
  (core instance $GOT.mem (;2;)
    (export "__stack_high" (global $__stack_high))
    (export "__stack_low" (global $__stack_low))
  )
  (core instance $bar (;3;) (instantiate $bar
      (with "env" (instance $env))
      (with "GOT.mem" (instance $GOT.mem))
    )
  )
  (alias core export $main "foo:memory_base" (core global $foo:memory_base (;4;)))
  (alias core export $main "foo:table_base" (core global $foo:table_base (;5;)))
  (core instance $"#core-instance4 env" (@name "env") (;4;)
    (export "__memory_base" (global $foo:memory_base))
    (export "__table_base" (global $foo:table_base))
    (export "memory" (memory $memory))
    (export "__indirect_function_table" (table $__indirect_function_table))
  )
  (core instance $"#core-instance5 GOT.mem" (@name "GOT.mem") (;5;)
    (export "__stack_high" (global $__stack_high))
    (export "__stack_low" (global $__stack_low))
  )
  (core instance $foo (;6;) (instantiate $foo
      (with "env" (instance $"#core-instance4 env"))
      (with "GOT.mem" (instance $"#core-instance5 GOT.mem"))
    )
  )
  (core instance $__init (;7;) (instantiate $__init
      (with "env" (instance $main))
      (with "bar" (instance $bar))
      (with "foo" (instance $foo))
    )
  )
  (type (;0;) (func))
  (alias core export $bar "test:test/test#bar" (core func $test:test/test#bar (;0;)))
  (func $bar (;0;) (type 0) (canon lift (core func $test:test/test#bar)))
  (component $test:test/test-shim-component (;0;)
    (type (;0;) (func))
    (import "import-func-bar" (func (;0;) (type 0)))
    (type (;1;) (func))
    (export (;1;) "bar" (func 0) (func (type 1)))
  )
  (instance $test:test/test-shim-instance (;0;) (instantiate $test:test/test-shim-component
      (with "import-func-bar" (func $bar))
    )
  )
  (export $test:test/test (;1;) "test:test/test" (instance $test:test/test-shim-instance))
  (@producers
    (processed-by "wit-component" "$CARGO_PKG_VERSION")
  )
)