Stream: wasi

Topic: wasi rust crate 0.2 Filesystem module, No Iteratable for ...


view this post on Zulip Joshua Aruokhai (Dec 03 2024 at 19:48):

It doesn't have an Iteratable, could you show how it should be called ?

view this post on Zulip Pat Hickey (Dec 03 2024 at 19:49):

the read-directory-entry method is intended to be called repeatedly until it returns none, indicating iteration is finished

view this post on Zulip Joshua Aruokhai (Dec 03 2024 at 19:53):

Oh I think I get it , let me try that

view this post on Zulip Pat Hickey (Dec 03 2024 at 19:54):

the wasi crate is just plain old outputs of wit-bindgen, and doesnt try to put a nicer layer of idiomatic rust on top of it.

view this post on Zulip Pat Hickey (Dec 03 2024 at 19:54):

so you'd have to do your own wrapper that provides an impl Iterator

view this post on Zulip Pat Hickey (Dec 03 2024 at 19:55):

yosh and i have a wip crate wstd that provides async rust abstractions closer to what you'd expect on top of the raw bindings, but its not really ready for general use yet, and idk if we got to this particular case or not

view this post on Zulip Joshua Aruokhai (Dec 03 2024 at 20:05):

Oh ok, thanks a lot, could you provide the link to the crate, would love to check it out

view this post on Zulip Pat Hickey (Dec 03 2024 at 20:28):

https://github.com/yoshuawuyts/wstd

A WebAssembly-native stdlib. Contribute to yoshuawuyts/wstd development by creating an account on GitHub.

Last updated: Dec 23 2024 at 12:05 UTC