-
Notifications
You must be signed in to change notification settings - Fork 19
Flag wasi:cli/run#run as an async function
#79
Conversation
I think this was lost in various translations here and there, but I'm under the impression that the intention is that this is should be `async`-by-default.
|
Should it be? Typical |
|
Personally, I think it should be. I agree that all precedent is a synchronous main, but this won't change that. The precedent exists as there has basically never been another option. For example there's basically no other way For WASI though language integration will always keep synchronous |
|
I can see the argument that all synchronous-main languages will just override the default anyway, so we should focus on people coding to the raw bindings. In that case, how easy will it be to write a basic |
|
In Rust you'd need to compile a cdylib which is a bit of a bummer (I don't know of a way to get a bin target working). For C you'd need to compile with The trigger for this PR was WebAssembly/wasi-testsuite#120 and feeling that the generation option of: was unnecessary. I was thinking to update the |
|
FWIW I am able to compile components just fine as bin targets in Rust without a mention of |
|
Indeed that works! The way that ends up working though is because the WASIp1-to-WASIp2 |
|
I don't have a strong opinion here, and this seems to be limited to people writing to the raw bindings. So I'm inclined to make this change and see how it goes. Since no one else has objected here, let's merge this. If this causes trouble for anyone, please file issues so that we can figure out what to do. |
I think this was lost in various translations here and there, but I'm under the impression that the intention is that this is should be
async-by-default.