Skip to content

Update Wasmtime's available features and how they are accessed#313

Merged
sbc100 merged 1 commit intoWebAssembly:mainfrom
abrown:patch-1
Feb 7, 2023
Merged

Update Wasmtime's available features and how they are accessed#313
sbc100 merged 1 commit intoWebAssembly:mainfrom
abrown:patch-1

Conversation

@abrown
Copy link
Contributor

@abrown abrown commented Feb 4, 2023

Wasmtime now has support for the threads proposal; this change adds that. It also uses the correct --wasm-features flag for enabling optional features.

Wasmtime now has support for the threads proposal; this change adds that. It also uses the correct `--wasm-features` flag for enabling optional features.
@abrown
Copy link
Contributor Author

abrown commented Feb 7, 2023

cc: @RReverser, @sbc100?

@sbc100 sbc100 merged commit a27f899 into WebAssembly:main Feb 7, 2023
@abrown abrown deleted the patch-1 branch February 7, 2023 22:38
"signExtensions": true,
"simd": "0.33",
"threads": null
"threads": ["flag", "Requires flag `--wasm-features=threads`"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SyntaxError: Expected double-quoted property name in JSON at position 5855

The trailing comma is breaking the site.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, lets revert.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I opened #315 that solely fixes the flag syntax. Let's figure out what to do about the thread proposal line below...

@RReverser
Copy link
Member

Also we intentionally kept N/A (null rather than false) for WASI engines since, even if technically they support stoics, there is no way to spawn threads in WASI yet, so that functionality is not accessible by direct users.

I don't think anything changed in WASI in that regard yet?

@andylizi
Copy link
Contributor

andylizi commented Feb 8, 2023

My understanding of N/A is more along the lines of, "the feature in question doesn't make sense for this platform." For example, JS BigInt integration is N/A for wasmtime, because wasmtime doesn't have anything to do with JS interop.

But wasmtime is certainly going to support threads eventually, and it makes sense for it to do so considering its use cases for running Wasm on backend servers. So IMHO even though the API design isn't there yet, from a user's standpoint, I feel "currently not supported" would be a more fitting description.

abrown added a commit to abrown/wasm-website that referenced this pull request Feb 8, 2023
This was a part of the reverted WebAssembly#313; this provides the correct flag syntax for several off-by-default features.
@abrown abrown mentioned this pull request Feb 8, 2023
@abrown
Copy link
Contributor Author

abrown commented Feb 8, 2023

@RReverser, @andylizi: I think this cell in the roadmap table indicates support for the Wasm threads proposal, which consists of shared memory, atomic operations, and wait/notify. As mentioned, that proposal contains no mechanism for spawning threads. But "implementing the proposal" is completely possible without the ability to spawn threads: if the instructions are supported and the tests pass, I believe that is enough to consider a Wasm proposal supported. Wasmtime does this behind the --wasm-features=threads flag so it feels to me like this cell should in fact reflect that.

But there's more: I (and others) have been working on a WASI proposal to add a mechanism for spawning threads in WASI--wasi-threads. Wasmtime is just now gaining support for that (I'm working through several details) as is WAMR. There are many questions here and everything is very experimental, but I'm just pointing out that there is an in-progress way to spawn threads. IMHO I don't think this needs to play a large part in how the cell is filled in (that seems a "does the engine implement the Wasm proposal?" question) but it may change the equation for you all. Thoughts?

chicoxyzzy pushed a commit that referenced this pull request Feb 16, 2023
This was a part of the reverted #313; this provides the correct flag
syntax for several off-by-default features.
@CryZe CryZe mentioned this pull request Sep 24, 2023
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

Successfully merging this pull request may close these issues.

4 participants