Live data from Hacker News

Standardizing WASI: A system interface to run WebAssembly outside the web

hacks.mozilla.org

1–10 of 238 posts

Re: Standardizing WASI: A system interface to run WebAssembly outside the web

#4
Been hoping a stdlib for WASM would spring up. So if I wanted to implement a WASI backend (e.g. on the JVM), are the function definitions I should implement here: [0]? I assume string, array, struct, etc layout in WASM mem is as C expects? Also, is it a goal to provide a test suite to test conforming backend implementations (may already be there, didn't look)? Finally, pardon my lack of research before asking, does this mean that an LLVM-based WASM compilation can target this instead of emscripten/libc and the final WASM could reference all of these API pieces as a imports? Is there an expected posix/libc-to-wasi lib?

0 - https://github.com/CraneStation/wasmtime-wasi/blob/wasi/docs...

Re: Standardizing WASI: A system interface to run WebAssembly outside the web

#6
post #4

Been hoping a stdlib for WASM would spring up. So if I wanted to implement a WASI backend (e.g. on the JVM), are the function definitions I should implement here: [0]? I assume string, array, struct, etc layout in WASM mem is as C expects? Also, is it a goal to provide a test suite to test conforming backend implementations (may already be there, didn't look)? Finally, pardon my lack of research before asking, does t…

(Member of the team at Mozilla here )

Yes, that's the list.

And the layout of structs, strings, etc is up to the compiler, within the bounds of the restrictions WebAssembly imposes.

We'll definitely have a test suite, but this is all early days, so a lot of all that isn't yet in place.

And yes, this can be targeted by LLVM-based and other compilers. In fact, Emscripten could use this as the foundation for their POSIX-like libc and library packages. The syscalls are indeed exposed as Wasm function imports.

Re: Standardizing WASI: A system interface to run WebAssembly outside the web

#7
post #5

How much of the Fuscia model apply to Web Assembly? It seems like they could share similar security models

We've mainly based the current design on CloudABI/Capsicum, but it's all early days, and Fuchsia is on our list of systems to at the very least take heavy inspiration from :)

Re: Standardizing WASI: A system interface to run WebAssembly outside the web

#8
This year is extremely interesting times for WebAssembly, there's a number of these different runtimes popping up. The effects of all of these decisions, including stuff like this, won't be felt until next year... I wonder how much adoption this will get, but the lineup looks extremely strong.

Re: Standardizing WASI: A system interface to run WebAssembly outside the web

#9
Love it. This could be a huge innovation and really push the dream of cross platform development to the next level.

I suppose this would have pretty big implications for Electron or a similar successor to aid in the UI portion of this endeavor.

Re: Standardizing WASI: A system interface to run WebAssembly outside the web

#10
post #4

Been hoping a stdlib for WASM would spring up. So if I wanted to implement a WASI backend (e.g. on the JVM), are the function definitions I should implement here: [0]? I assume string, array, struct, etc layout in WASM mem is as C expects? Also, is it a goal to provide a test suite to test conforming backend implementations (may already be there, didn't look)? Finally, pardon my lack of research before asking, does t…

(Member of the team at Mozilla here ) Yes, that's the list. And the layout of structs, strings, etc is up to the compiler, within the bounds of the restrictions WebAssembly imposes. We'll definitely have a test suite, but this is all early days, so a lot of all that isn't yet in place. And yes, this can be targeted by LLVM-based and other compilers. In fact, Emscripten could use this as the foundation for their POSIX…

Will WASI normalize differences between platforms? e.g. convert argv or paths to a consistent character encoding?
Post reply on HN