nodejs / uvwasi

WASI syscall API built atop libuv
MIT License
222 stars 48 forks source link

Preview2 Status #255

Open guybedford opened 3 months ago

guybedford commented 3 months ago

As a further update on https://github.com/nodejs/uvwasi/issues/59, it is now possible to use Preview 2 components via Jco with support for the full set of Preview2 APIs, passing the conformance test suites on Node.js.

To achieve this, Jco implements a Preview 2 implementation on top of the high-level Node.js APIs using the preview2-shim library, which while correct has performance limitations that a uvwasi implementation would avoid. There is an open issue on the Jco project for improving performance in Jco in https://github.com/bytecodealliance/jco/issues/417.

Ideally for the best performance, Preview 2 should be fully implemented in uvwasi, so this is very much a question of implementation effort not design or architecture.

On top of low-level bindings development, there are also the high-level API design questions for Preview 2. Direct host integration, eg for a Node.js Preview2 implementation, should likely involve:

High-level API work can already be achieved using Jco transpile today as an internal implementation. These two work streams - high-level API integration, and low-level uvwasi updating can thus be implemented completely independently at this point in time based on how development priorities turn out.