thread 'main' panicked at 'not implemented: VirtualFile::poll is not implemented for non-Unix-like targets yet'
Guess I still just have to wait, but seems weird to call it 1.0.
thread 'main' panicked at 'not implemented: VirtualFile::poll is not implemented for non-Unix-like targets yet'
Guess I still just have to wait, but seems weird to call it 1.0.
https://github.com/WebAssembly/wasi-libc/blob/main/libc-bott...
Symlinks, hardlinks, errno, etc. It's not surprising that it's better supported on Unix than other platforms.
And yeah I agree it's disappointing they tacked such an obviously platform-biased API on to something that is supposed to be platform independent. I guess it was the pragmatic thing but still...
Here's the actual WASI spec:
https://github.com/WebAssembly/WASI/blob/main/phases/snapsho...
You'll find it matches the file I linked. Search for "POSIX" or "errno".
So I guess you could summarise it as: backward compatible-ish first, and then figuring out what a neater, more idiomatic world would look like second.
It's a pragmatic approach to bootstrapping the ecosystem, and there's no need for the POSIX-alike parts to hold anyone back, at least long term. Pretty soon you will be able to write apps that target WASI that end up reading and writing files in practice without the app even knowing what a "file" is (the runtime can just hand it an abstract IO object). That's a step beyond just not knowing about things like symlinks, and seems to me like a more "web-flavoured" future that can work even for CLI/desktop apps.
What's the alternative? If you want an I/O system interface into WASM, something POSIX-like is probably the sanest choice one could make. Portable is literally in the name. In fact I'd say POSIX the least obviously biased system interface.
Is there some other syscall interface out there which implementS files, sockets, and clocks, which is simpler than POSIX?
In fact WASI seems quite stripped down from POSIX.