Stream: wasi

Topic: encoding for component


view this post on Zulip Zihang Ye (Jul 18 2024 at 02:20):

I'm trying to embed a component with wasm-tools component embed wit --encoding utf16 and this component make uses of the wasi:cli's stdout and get-arguments. However from my testing, I read utf16 from get-arguments but I need to write utf8 to stdout. Is that expected?

view this post on Zulip Christof Petig (Jul 18 2024 at 06:11):

Yes, because only strings are converted, not streams or files.

view this post on Zulip Christof Petig (Jul 18 2024 at 06:12):

But I agree that it is confusing once you combine it in one sentence.

view this post on Zulip Zihang Ye (Jul 18 2024 at 06:38):

Now I see that it writes bytes instead of string. Thank you.


Last updated: Dec 23 2024 at 12:05 UTC