wit-component 0.259.0

Tooling for working with `*.wit` and component files together.
Documentation
(component
  (core module $main (;0;)
    (type (;0;) (func))
    (type (;1;) (func (param i32 i32)))
    (type (;2;) (func (result i32)))
    (type (;3;) (func (param i32 i32) (result i32)))
    (type (;4;) (func (param i32)))
    (type (;5;) (func (param i32) (result i32)))
    (type (;6;) (func (param i32 i32 i32) (result i32)))
    (type (;7;) (func (param i32 i32 i32 i32) (result i32)))
    (import "env" "memory" (memory (;0;) 1))
    (import "$root" "[backpressure-inc]" (func (;0;) (type 0)))
    (import "$root" "[backpressure-dec]" (func (;1;) (type 0)))
    (import "[export]$root" "[task-cancel]" (func (;2;) (type 0)))
    (import "[export]$root" "[task-return]foo" (func (;3;) (type 1)))
    (import "[export]foo:foo/bar" "[task-return]foo" (func (;4;) (type 1)))
    (import "$root" "[waitable-set-new]" (func (;5;) (type 2)))
    (import "$root" "[waitable-set-wait]" (func (;6;) (type 3)))
    (import "$root" "[waitable-set-poll]" (func (;7;) (type 3)))
    (import "$root" "[waitable-set-drop]" (func (;8;) (type 4)))
    (import "$root" "[waitable-join]" (func (;9;) (type 1)))
    (import "$root" "[thread-yield]" (func (;10;) (type 2)))
    (import "$root" "[subtask-drop]" (func (;11;) (type 4)))
    (import "$root" "[subtask-cancel]" (func (;12;) (type 5)))
    (import "$root" "[error-context-new-utf8]" (func (;13;) (type 3)))
    (import "$root" "[error-context-new-utf16]" (func (;14;) (type 3)))
    (import "$root" "[error-context-new-latin1+utf16]" (func (;15;) (type 3)))
    (import "$root" "[error-context-debug-message-utf8]" (func (;16;) (type 1)))
    (import "$root" "[error-context-debug-message-utf16]" (func (;17;) (type 1)))
    (import "$root" "[error-context-debug-message-latin1+utf16]" (func (;18;) (type 1)))
    (import "$root" "[error-context-drop]" (func (;19;) (type 4)))
    (import "$root" "[context-get-0]" (func (;20;) (type 2)))
    (import "$root" "[context-set-0]" (func (;21;) (type 4)))
    (import "$root" "[future-read-unit]" (func (;22;) (type 3)))
    (import "$root" "[future-write-unit]" (func (;23;) (type 3)))
    (import "$root" "[stream-read-unit]" (func (;24;) (type 6)))
    (import "$root" "[stream-write-unit]" (func (;25;) (type 6)))
    (import "$root" "[future-write-0]a" (func (;26;) (type 3)))
    (import "$root" "[future-read-0]a" (func (;27;) (type 3)))
    (import "$root" "[stream-write-0]b" (func (;28;) (type 6)))
    (import "$root" "[stream-read-0]b" (func (;29;) (type 6)))
    (import "$root" "[future-write-0]c" (func (;30;) (type 3)))
    (import "$root" "[future-read-0]c" (func (;31;) (type 3)))
    (import "$root" "[stream-write-0]d" (func (;32;) (type 6)))
    (import "$root" "[stream-read-0]d" (func (;33;) (type 6)))
    (export "[async-lift-stackful]foo" (func 34))
    (export "[async-lift-stackful]foo:foo/bar#foo" (func 35))
    (export "cabi_realloc" (func 36))
    (func (;34;) (type 1) (param i32 i32)
      unreachable
    )
    (func (;35;) (type 1) (param i32 i32)
      unreachable
    )
    (func (;36;) (type 7) (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) (result i32)))
    (type (;2;) (func (param i32 i32 i32) (result i32)))
    (table (;0;) 5 5 funcref)
    (memory (;0;) 1)
    (export "0" (func $error-debug-message))
    (export "1" (func $"#func1 error-debug-message"))
    (export "2" (func $"#func2 error-debug-message"))
    (export "3" (func $"$root-[future-read-0]c"))
    (export "4" (func $"$root-[stream-read-0]d"))
    (export "$imports" (table 0))
    (export "$memory" (memory 0))
    (func $error-debug-message (;0;) (type 0) (param i32 i32)
      local.get 0
      local.get 1
      i32.const 0
      call_indirect (type 0)
    )
    (func $"#func1 error-debug-message" (@name "error-debug-message") (;1;) (type 0) (param i32 i32)
      local.get 0
      local.get 1
      i32.const 1
      call_indirect (type 0)
    )
    (func $"#func2 error-debug-message" (@name "error-debug-message") (;2;) (type 0) (param i32 i32)
      local.get 0
      local.get 1
      i32.const 2
      call_indirect (type 0)
    )
    (func $"$root-[future-read-0]c" (;3;) (type 1) (param i32 i32) (result i32)
      local.get 0
      local.get 1
      i32.const 3
      call_indirect (type 1)
    )
    (func $"$root-[stream-read-0]d" (;4;) (type 2) (param i32 i32 i32) (result i32)
      local.get 0
      local.get 1
      local.get 2
      i32.const 4
      call_indirect (type 2)
    )
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
    )
  )
  (core instance $wit-component-shim-instance (;0;) (instantiate $wit-component-shim-module))
  (alias core export $wit-component-shim-instance "$memory" (core memory $memory (;0;)))
  (core instance $env (;1;)
    (export "memory" (memory $memory))
  )
  (core func $backpressure.inc (;0;) (canon backpressure.inc))
  (core func $backpressure.dec (;1;) (canon backpressure.dec))
  (core func $waitable-set.new (;2;) (canon waitable-set.new))
  (core func $waitable-set.wait (;3;) (canon waitable-set.wait (memory $memory)))
  (core func $waitable-set.poll (;4;) (canon waitable-set.poll (memory $memory)))
  (core func $waitable-set.drop (;5;) (canon waitable-set.drop))
  (core func $waitable.join (;6;) (canon waitable.join))
  (core func $thread.yield (;7;) (canon thread.yield))
  (core func $subtask.drop (;8;) (canon subtask.drop))
  (core func $subtask.cancel (;9;) (canon subtask.cancel))
  (core func $error-context.new (;10;) (canon error-context.new (memory $memory) string-encoding=utf8))
  (core func $"#core-func11 error-context.new" (@name "error-context.new") (;11;) (canon error-context.new (memory $memory) string-encoding=utf16))
  (core func $"#core-func12 error-context.new" (@name "error-context.new") (;12;) (canon error-context.new (memory $memory) string-encoding=latin1+utf16))
  (alias core export $wit-component-shim-instance "0" (core func $error-debug-message (;13;)))
  (alias core export $wit-component-shim-instance "1" (core func $"#core-func14 error-debug-message" (@name "error-debug-message") (;14;)))
  (alias core export $wit-component-shim-instance "2" (core func $"#core-func15 error-debug-message" (@name "error-debug-message") (;15;)))
  (core func $error-context.drop (;16;) (canon error-context.drop))
  (core func $"context.get 0" (;17;) (canon context.get i32 0))
  (core func $"context.set 0" (;18;) (canon context.set i32 0))
  (type (;0;) (future))
  (core func $future.read (;19;) (canon future.read 0 (memory $memory)))
  (core func $future.write (;20;) (canon future.write 0 (memory $memory)))
  (type (;1;) (stream))
  (core func $stream.read (;21;) (canon stream.read 1 (memory $memory)))
  (core func $stream.write (;22;) (canon stream.write 1 (memory $memory)))
  (type (;2;) (future u32))
  (core func $"#core-func23 future.write" (@name "future.write") (;23;) (canon future.write 2 (memory $memory)))
  (core func $"#core-func24 future.read" (@name "future.read") (;24;) (canon future.read 2 (memory $memory)))
  (type (;3;) (stream u32))
  (core func $"#core-func25 stream.write" (@name "stream.write") (;25;) (canon stream.write 3 (memory $memory)))
  (core func $"#core-func26 stream.read" (@name "stream.read") (;26;) (canon stream.read 3 (memory $memory)))
  (type (;4;) (future string))
  (core func $"#core-func27 future.write" (@name "future.write") (;27;) (canon future.write 4 (memory $memory) string-encoding=utf8))
  (alias core export $wit-component-shim-instance "3" (core func $"$root-[future-read-0]c" (;28;)))
  (type (;5;) (stream string))
  (core func $"#core-func29 stream.write" (@name "stream.write") (;29;) (canon stream.write 5 (memory $memory) string-encoding=utf8))
  (alias core export $wit-component-shim-instance "4" (core func $"$root-[stream-read-0]d" (;30;)))
  (core instance $$root (;2;)
    (export "[backpressure-inc]" (func $backpressure.inc))
    (export "[backpressure-dec]" (func $backpressure.dec))
    (export "[waitable-set-new]" (func $waitable-set.new))
    (export "[waitable-set-wait]" (func $waitable-set.wait))
    (export "[waitable-set-poll]" (func $waitable-set.poll))
    (export "[waitable-set-drop]" (func $waitable-set.drop))
    (export "[waitable-join]" (func $waitable.join))
    (export "[thread-yield]" (func $thread.yield))
    (export "[subtask-drop]" (func $subtask.drop))
    (export "[subtask-cancel]" (func $subtask.cancel))
    (export "[error-context-new-utf8]" (func $error-context.new))
    (export "[error-context-new-utf16]" (func $"#core-func11 error-context.new"))
    (export "[error-context-new-latin1+utf16]" (func $"#core-func12 error-context.new"))
    (export "[error-context-debug-message-utf8]" (func $error-debug-message))
    (export "[error-context-debug-message-utf16]" (func $"#core-func14 error-debug-message"))
    (export "[error-context-debug-message-latin1+utf16]" (func $"#core-func15 error-debug-message"))
    (export "[error-context-drop]" (func $error-context.drop))
    (export "[context-get-0]" (func $"context.get 0"))
    (export "[context-set-0]" (func $"context.set 0"))
    (export "[future-read-unit]" (func $future.read))
    (export "[future-write-unit]" (func $future.write))
    (export "[stream-read-unit]" (func $stream.read))
    (export "[stream-write-unit]" (func $stream.write))
    (export "[future-write-0]a" (func $"#core-func23 future.write"))
    (export "[future-read-0]a" (func $"#core-func24 future.read"))
    (export "[stream-write-0]b" (func $"#core-func25 stream.write"))
    (export "[stream-read-0]b" (func $"#core-func26 stream.read"))
    (export "[future-write-0]c" (func $"#core-func27 future.write"))
    (export "[future-read-0]c" (func $"$root-[future-read-0]c"))
    (export "[stream-write-0]d" (func $"#core-func29 stream.write"))
    (export "[stream-read-0]d" (func $"$root-[stream-read-0]d"))
  )
  (core func $task.cancel (;31;) (canon task.cancel))
  (core func $task.return (;32;) (canon task.return (result string) (memory $memory) string-encoding=utf8))
  (core instance $"[export]$root" (;3;)
    (export "[task-cancel]" (func $task.cancel))
    (export "[task-return]foo" (func $task.return))
  )
  (core func $"#core-func33 task.return" (@name "task.return") (;33;) (canon task.return (result string) (memory $memory) string-encoding=utf8))
  (core instance $"[export]foo:foo/bar" (;4;)
    (export "[task-return]foo" (func $"#core-func33 task.return"))
  )
  (core instance $main (;5;) (instantiate $main
      (with "env" (instance $env))
      (with "$root" (instance $$root))
      (with "[export]$root" (instance $"[export]$root"))
      (with "[export]foo:foo/bar" (instance $"[export]foo:foo/bar"))
    )
  )
  (core module $wit-component-fixup (;2;)
    (type (;0;) (func (param i32 i32)))
    (type (;1;) (func (param i32 i32) (result i32)))
    (type (;2;) (func (param i32 i32 i32) (result i32)))
    (import "actual" "0" (func $0 (;0;) (type 0)))
    (import "actual" "1" (func $1 (;1;) (type 0)))
    (import "actual" "2" (func $2 (;2;) (type 0)))
    (import "actual" "3" (func $3 (;3;) (type 1)))
    (import "actual" "4" (func $4 (;4;) (type 2)))
    (import "shim" "$imports" (table (;0;) 5 5 funcref))
    (elem (;0;) (i32.const 0) func $0 $1 $2 $3 $4)
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
    )
  )
  (alias core export $main "cabi_realloc" (core func $cabi_realloc (;34;)))
  (core func $error-context.debug-message (;35;) (canon error-context.debug-message (memory $memory) (realloc $cabi_realloc) string-encoding=utf8))
  (core func $"#core-func36 error-context.debug-message" (@name "error-context.debug-message") (;36;) (canon error-context.debug-message (memory $memory) (realloc $cabi_realloc) string-encoding=utf16))
  (core func $"#core-func37 error-context.debug-message" (@name "error-context.debug-message") (;37;) (canon error-context.debug-message (memory $memory) (realloc $cabi_realloc) string-encoding=latin1+utf16))
  (core func $"#core-func38 future.read" (@name "future.read") (;38;) (canon future.read 4 (memory $memory) (realloc $cabi_realloc) string-encoding=utf8))
  (core func $"#core-func39 stream.read" (@name "stream.read") (;39;) (canon stream.read 5 (memory $memory) (realloc $cabi_realloc) string-encoding=utf8))
  (core instance $actual (;6;)
    (export "0" (func $error-context.debug-message))
    (export "1" (func $"#core-func36 error-context.debug-message"))
    (export "2" (func $"#core-func37 error-context.debug-message"))
    (export "3" (func $"#core-func38 future.read"))
    (export "4" (func $"#core-func39 stream.read"))
  )
  (core instance $fixup (;7;) (instantiate $wit-component-fixup
      (with "actual" (instance $actual))
      (with "shim" (instance $wit-component-shim-instance))
    )
  )
  (type (;6;) (func async (param "s" string) (result string)))
  (alias core export $main "[async-lift-stackful]foo" (core func $"[async-lift-stackful]foo" (;40;)))
  (func $foo (;0;) (type 6) (canon lift (core func $"[async-lift-stackful]foo") (memory $memory) (realloc $cabi_realloc) string-encoding=utf8 async))
  (export $"#func1 foo" (@name "foo") (;1;) "foo" (func $foo))
  (alias core export $main "[async-lift-stackful]foo:foo/bar#foo" (core func $"[async-lift-stackful]foo:foo/bar#foo" (;41;)))
  (func $"#func2 foo" (@name "foo") (;2;) (type 6) (canon lift (core func $"[async-lift-stackful]foo:foo/bar#foo") (memory $memory) (realloc $cabi_realloc) string-encoding=utf8 async))
  (component $foo:foo/bar-shim-component (;0;)
    (type (;0;) (func async (param "s" string) (result string)))
    (import "import-func-foo" (func (;0;) (type 0)))
    (type (;1;) (func async (param "s" string) (result string)))
    (export (;1;) "foo" (func 0) (func (type 1)))
  )
  (instance $foo:foo/bar-shim-instance (;0;) (instantiate $foo:foo/bar-shim-component
      (with "import-func-foo" (func $"#func2 foo"))
    )
  )
  (export $foo:foo/bar (;1;) "foo:foo/bar" (instance $foo:foo/bar-shim-instance))
  (@producers
    (processed-by "wit-component" "$CARGO_PKG_VERSION")
  )
)