Skip to content
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

Is there any plan about supporting WASI preview2? #430

Open
lum1n0us opened this issue Aug 4, 2023 · 7 comments
Open

Is there any plan about supporting WASI preview2? #430

lum1n0us opened this issue Aug 4, 2023 · 7 comments

Comments

@lum1n0us
Copy link

lum1n0us commented Aug 4, 2023

Seems WASI is going to upgrade to preview2.

@jeffparsons
Copy link

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!

@jedisct1
Copy link
Member

jedisct1 commented Sep 2, 2023

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.

@sunfishcode
Copy link
Member

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.

@lum1n0us
Copy link
Author

lum1n0us commented Sep 3, 2023

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.

@yamt
Copy link
Contributor

yamt commented Sep 28, 2023

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?

@squillace
Copy link

it might very well be!

@dicej
Copy link
Contributor

dicej commented Nov 28, 2023

I've just opened a new issue with a proposal that addresses this topic: #447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants