directories-rs icon indicating copy to clipboard operation
directories-rs copied to clipboard

WASM build for the library?

Open ieugen opened this issue 1 year ago • 3 comments

Hi,

Have you considered a WebAssembly build for the library ? It should allow the usage of this library from any system using webassembly.

WebAssembly + WASI is getting traction and I think it's a good target to keep in mind.

ieugen avatar Sep 27 '22 07:09 ieugen

I saw the file https://github.com/dirs-dev/directories-rs/blob/main/src/wasm.rs . Should I assume the library is usable from web-assembly ? I did not see any instructions / other information.

ieugen avatar Sep 27 '22 07:09 ieugen

Hi @ieugen,

it only means it builds on WASM, but no directories are provided.

I'd expect that WASI already offers an API comparable to dirs, would be crazy if they just repeated the mistakes of the last decades. Is there a listing of available APIs for WASI somewhere?

Thanks,

Simon

soc avatar Sep 27 '22 10:09 soc

I think all authoritative documents should be here https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-documents.md .

I think WASI is focused on providing access to the underlying platform in a portable way. I don't think they care about standardized directory structures.

Checking out the API - it looks much lower level: https://github.com/WebAssembly/WASI/blob/main/phases/snapshot/docs.md .

https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-overview.md

ieugen avatar Sep 27 '22 10:09 ieugen