-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Considerations for WASI standardization phases #38
Comments
Regarding 2), I'd say that in general we want to get some diversity of implementations if possible. For example it would be better to get one blockchain embedding and one edge-cache embedding instead of 2 of the same type. But on the other hand if there's an API that only makes sense on blockchain or one particular type of embedding we don't want to preclude that either. Also, all else being equal, implementations that are more widely-used, actively-developed, high-quality, easy-to-understand, and/or open source are better than.... not those things. But that's hard to qualify precisely. |
Regarding 3), I think mirroring the CG/WG split from the main phase process (where the "CG" there is the subgroup here, and the "WG" is the CG), is a good idea. In particular it means that
This means that the CG doesn't make change itself, but can send a proposal back to the subgroup. One thing unresolved by this is, when and how does the WG get involved? Do we plan on turning all of the WASI docs into WG-level artifacts alongside the wasm spec? |
One way to look at the process would be to promote parts of WASI out of the subgroup and into the Wasm CG as individual proposals when they're ready. I think that'd be the least-overhead thing to do, but there are some open questions around it. In particular, at what stage of the process do proposals enter the CG? Do we have a mechanism for sending them back? Is there even truly a "sending back-and-forth" going on, or is it more "let's get more eyes on this, but the work continues in the subgroup"? (I think I like that last view best.)
That requirement only exists for the core spec, no e.g. the JS API, right? ISTM that the situation with WASI is more similar to that of the JS API, and having the requirement might also not make sense.
Yeah, this is interesting :) We might be able to apply some learnings from TC39 here: the staging process in TC39 also has the "at least two implementations" requirement, but what counts as an implementation is deliberately left unspecified. This is because for some proposals there isn't that much verification of implementability required, so e.g. a Babel implementation might be fine, whereas for others, there are much more interesting questions around whether something is implementable across multiple engines in a sufficiently performant way. In those cases, two high-performance engines need to implement.
I'm not convinced that'll always be a good guiding principle. What's to say that a blockchain embedding and an edge-cache one won't share the same runtime, and hence implementation of a WASI API? I do however agree that whenever there are real differences to be had, we should aim for having two or more very different implementations, with different use case requirements. |
To get very specific, are Fastly's Lucet and Mozilla's WASMtime considered too similar for the 2 implementation rule because Lucet and WASMTime both use Cranelift? |
If those aren't different enough, I've got an implementation written in js: https://github.com/devsnek/node-wasi/ |
Adding to the runtime diversity: Wasmer intends to fully support Windows which, in my experience so far, has been much trickier than getting it working on Unix-like platforms. Symlinks in particular, but many of the file system details in general, may just not work well in a Windows context without the runtime having a substantial emulation layer between it and the host system. |
Yes, there are several implementations planning for WASI on Windows, and also some non-traditional-OS environments as well. So I agree with @tschneidereit's idea that we leave it unspecified exactly what kind of implementations we'll require here in general, and let the Subgroup decide what's needed for features as they progress to that phase in the process. |
Maybe I misunderstood, but traditional tree-like filesystem [1] [2] and anything similar to that (e.g. some DB-like API or graph API or whatsoever) shall be separated in an optional module and not required for WASI implementation. So wasmer can easily implement everything else and leave the "fs" module for later time once the WASI standard is more settled and the community can focus on modules rather than the core. |
Are there any concerns about @tschneidereit's suggestion here to replace "Web VMs" with "implementations" and leave it up to the committee to decide the specific condition of diversity of "implementations" needed, on a feature-by-feature basis? |
This is fine to me. |
On Wed, May 15, 2019, 3:47 PM Luke Imhoff ***@***.***> wrote:
replace “Web VMs” with “implementations” and leave it up to the committee
This is fine to me.
Sounds good to me too.
… |
IMO anything that can't be mapped losslessly to Windows files (or native files on other relevant OSes) should be removed from WASI: so advancing the WASI file I/O API to stage 4 should require at least one implementation that exposes Windows native files to WASI. |
I agree that working well on diverse platforms is highly desirable! The biggest fundamental incompatibility that I'm aware of is that I believe Windows locks files for reading. Some things will be easier on more modern Windows; I think Windows 10 allows symlinks without elevated auth. That said, I don't have very much knowledge about Windows, so it could be user error on my part. |
According to the docs for Some of the biggest incompatibilities that I'm aware of are the different semantics of removing an open file (ending up with fd to unnamed file vs. remove operation failing), case sensitivity, and allowed character set (anything but newline and |
See also: https://boostgsoc13.github.io/boost.afio/doc/html/afio/FAQ/deleting_open_files.html |
case sensitivity is more an issue with the partition format than the os. i'm pretty sure ntfs can even flag specific directories as case sensitive. |
Let's discuss Windows related topics in other issues, so we can keep this issue focused on the WASI standards process :-). We agreed at the last meeting that changing the requirement to 2 implementations, and letting the Subgroup decide the requirements for those implementations on a feature-by-feature basis is a good approach. |
Wasm has a phase process that describes how proposed features progress toward standardization. The process is designed to make it clear how to add to the wasm standard, both in terms of who should be involved and when, and the practical steps needed to ensure that we have all the artifacts we need before we declare things "done".
We'd like to have something similar for standardizing WASI, and it could be broadly similar.
Most of the steps in the process correspond fairly well to what we might want for WASI, and I expect to be uncontroversial but there are a couple of potentially-interesting bits to call out:
Aside from spec text and spec tests (which I assume we'll want too) the wasm spec has a reference interpreter, blessed as a single executable standard. Do we want to have an equivalent reference implementation? What should it be and/or what criteria do we want in a reference implementation?
To get to stage 4 wasm requires 2 or more "web VMs" to implement the feature. The requirement for multiple implementations helps ensure that a spec is implementable in different codebases with reasonable effort and avoids baking quirks of a particular VM into the standard (which is a good property that we want). Requiring that they be web VMs doesn't make sense for WASI though. So what should the requirement be? What kind of goal or property do we want in an implementation that we consider sufficient to allow a feature to be standardized?
At what point and how do we involve the broader wasm CG?
The text was updated successfully, but these errors were encountered: