wit-component 0.246.2

Tooling for working with `*.wit` and component files together.
Documentation
(component
  (type $ty-foo (;0;)
    (instance
      (type (;0;) (func))
      (export (;0;) "foo" (func (type 0)))
    )
  )
  (import "foo" (instance $foo (;0;) (type $ty-foo)))
  (type $ty-foo:foo/my-wasi (;1;)
    (instance
      (type (;0;) (func (param "code" u32)))
      (export (;0;) "proc-exit" (func (type 0)))
    )
  )
  (import "foo:foo/my-wasi" (instance $foo:foo/my-wasi (;1;) (type $ty-foo:foo/my-wasi)))
  (core module $main (;0;)
    (type (;0;) (func))
    (type (;1;) (func (param i32)))
    (type (;2;) (func (param i32 i32) (result i32)))
    (import "foo" "foo" (func (;0;) (type 0)))
    (import "wasi-snapshot-preview1" "proc_exit" (func (;1;) (type 1)))
    (import "wasi-snapshot-preview1" "random_get" (func (;2;) (type 2)))
    (memory (;0;) 1)
    (export "memory" (memory 0))
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
      (processed-by "my-fake-bindgen" "123.45")
    )
  )
  (core module $wit-component:adapter:wasi-snapshot-preview1 (;1;)
    (type (;0;) (func (param i32)))
    (type (;1;) (func (param i32 i32) (result i32)))
    (import "foo:foo/my-wasi" "proc-exit" (func $proc_exit (;0;) (type 0)))
    (export "proc_exit" (func 1))
    (export "random_get" (func 2))
    (func (;1;) (type 0) (param i32)
      local.get 0
      call $proc_exit
    )
    (func (;2;) (type 1) (param i32 i32) (result i32)
      i32.const 0
    )
  )
  (core module $wit-component-shim-module (;2;)
    (type (;0;) (func (param i32)))
    (type (;1;) (func (param i32 i32) (result i32)))
    (table (;0;) 2 2 funcref)
    (export "0" (func $adapt-wasi-snapshot-preview1-proc_exit))
    (export "1" (func $adapt-wasi-snapshot-preview1-random_get))
    (export "$imports" (table 0))
    (func $adapt-wasi-snapshot-preview1-proc_exit (;0;) (type 0) (param i32)
      local.get 0
      i32.const 0
      call_indirect (type 0)
    )
    (func $adapt-wasi-snapshot-preview1-random_get (;1;) (type 1) (param i32 i32) (result i32)
      local.get 0
      local.get 1
      i32.const 1
      call_indirect (type 1)
    )
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
    )
  )
  (core module $wit-component-fixup (;3;)
    (type (;0;) (func (param i32)))
    (type (;1;) (func (param i32 i32) (result i32)))
    (import "" "0" (func (;0;) (type 0)))
    (import "" "1" (func (;1;) (type 1)))
    (import "" "$imports" (table (;0;) 2 2 funcref))
    (elem (;0;) (i32.const 0) func 0 1)
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
    )
  )
  (core instance $wit-component-shim-instance (;0;) (instantiate $wit-component-shim-module))
  (alias export $foo "foo" (func $foo (;0;)))
  (core func $foo (;0;) (canon lower (func $foo)))
  (core instance $foo (;1;)
    (export "foo" (func $foo))
  )
  (alias core export $wit-component-shim-instance "0" (core func $adapt-wasi-snapshot-preview1-proc_exit (;1;)))
  (alias core export $wit-component-shim-instance "1" (core func $adapt-wasi-snapshot-preview1-random_get (;2;)))
  (core instance $wasi-snapshot-preview1 (;2;)
    (export "proc_exit" (func $adapt-wasi-snapshot-preview1-proc_exit))
    (export "random_get" (func $adapt-wasi-snapshot-preview1-random_get))
  )
  (core instance $main (;3;) (instantiate $main
      (with "foo" (instance $foo))
      (with "wasi-snapshot-preview1" (instance $wasi-snapshot-preview1))
    )
  )
  (alias core export $main "memory" (core memory $memory (;0;)))
  (alias export $foo:foo/my-wasi "proc-exit" (func $proc-exit (;1;)))
  (core func $proc-exit (;3;) (canon lower (func $proc-exit)))
  (core instance $foo:foo/my-wasi (;4;)
    (export "proc-exit" (func $proc-exit))
  )
  (core instance $"#core-instance5 wasi-snapshot-preview1" (@name "wasi-snapshot-preview1") (;5;) (instantiate $wit-component:adapter:wasi-snapshot-preview1
      (with "foo:foo/my-wasi" (instance $foo:foo/my-wasi))
    )
  )
  (alias core export $wit-component-shim-instance "$imports" (core table $"shim table" (;0;)))
  (alias core export $"#core-instance5 wasi-snapshot-preview1" "proc_exit" (core func $proc_exit (;4;)))
  (alias core export $"#core-instance5 wasi-snapshot-preview1" "random_get" (core func $random_get (;5;)))
  (core instance $fixup-args (;6;)
    (export "$imports" (table $"shim table"))
    (export "0" (func $proc_exit))
    (export "1" (func $random_get))
  )
  (core instance $fixup (;7;) (instantiate $wit-component-fixup
      (with "" (instance $fixup-args))
    )
  )
  (@producers
    (processed-by "wit-component" "$CARGO_PKG_VERSION")
  )
)