component-docs icon indicating copy to clipboard operation
component-docs copied to clipboard

replacing u32 -> string in adder tutorial example

Open dmk978 opened this issue 1 year ago • 0 comments

Let's try mentioned example for use with string, that's absolute straightforward. Component compiles well, but issuing

wasm-tools component wit target/wasm32-wasip1/release/adder.wasm

command produce really big file filled with a lot of imports and references to standard WASI worlds:

package root:component;

world root {
  import wasi:cli/[email protected];
  import wasi:cli/[email protected];
  import wasi:io/[email protected];
  import wasi:io/[email protected];
  import wasi:cli/[email protected];
  import wasi:cli/[email protected];
  import wasi:cli/[email protected];
  import wasi:clocks/[email protected];
  import wasi:filesystem/[email protected];
  import wasi:filesystem/[email protected];

  export docs:adder/[email protected];
}

and that continues for several screens. Why?

dmk978 avatar Sep 05 '24 11:09 dmk978