Is there any plan about supporting WASI preview2?
lum1n0us opened this issue · 7 comments
Seems WASI is going to upgrade to preview2.
Posting this because the best way to get an answer on the internet is to post the wrong answer and wait... 😉
My very rough understanding as an enthusiastic but otherwise uninvolved observer:
There's no great urgency to support preview2 in wasi-libc today for compatibility reasons because there are preview1->preview2 adaptors available — i.e. it's easy to adapt a module produced by wasi-libc to run on a preview2-only runtime.
On the other hand, as some preview2 WASI proposals mature, that would allow fleshing out missing functionality in wasi-libc. But there's still a fair bit of churn in the upstream WIT definitions for most of the proposals, so users wouldn't gain much by wasi-libc chasing preview2 now. It could be useful as an exercise in figuring out how best to support preview2 in wasi-libc, though.
I'm guessing some time after WasiCon would be good to start experimenting with that. But that's just my uninformed hunch.
Maybe someone who has more of a clue can correct me!
And it wouldn't be very useful until Zig can compile to the new ABI.
Agreed. There's no urgency, especially since preview1 code can work in a preview2 context.
To confirm, yes, we are planning to have a preview2 build of wasi-libc, and it'll be useful for languages that do support it, and yes, it's not been the highest priority because of the availability of wit-component and the adapter.
IIUC, please correct me when I'm wrong, at least in the next few months, wasi-libc will keep current status(by using preview1 style imports), especially api.h. If somebody want to work with a component instead of a core module, he/she should use wasi_snapshot_preview1.wasm.
To confirm, yes, we are planning to have a preview2 build of wasi-libc, and it'll be useful for languages that do support it, and yes, it's not been the highest priority because of the availability of wit-component and the adapter.
it might be higher priority for someone who wants to use preview2 w/o component-model, right?
it might very well be!