Skip to content

Remove wasi-threads and wasi-common from Wasmtime.#47

Open
alexcrichton wants to merge 1 commit intobytecodealliance:mainfrom
alexcrichton:rm-wasi-threads
Open

Remove wasi-threads and wasi-common from Wasmtime.#47
alexcrichton wants to merge 1 commit intobytecodealliance:mainfrom
alexcrichton:rm-wasi-threads

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

Delete the implementation of the wasi-threads proposal from Wasmtime, namely the wasmtime-wasi-threads and wasi-common crates, along with the -Sthreads CLI flag. Uses cases that need any threading at all for portability will be served in the near term with WASIp3 cooperative threads, and long-term support for true multithreading will be best served through the shared-everything-threads proposal.

Delete the implementation of the [wasi-threads] proposal from Wasmtime, namely
the `wasmtime-wasi-threads` and `wasi-common` crates, along with the `-Sthreads`
CLI flag. Uses cases that need any threading at all for portability will be
served in the near term with WASIp3 cooperative threads, and long-term support
for true multithreading will be best served through the
[shared-everything-threads] proposal.

[wasi-threads]: https://github.com/webassembly/wasi-threads
[shared-everything-threads]: https://github.com/webassembly/shared-everything-threads
Copy link
Copy Markdown
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Thanks for writing this up!

crate has a fundamentally different design than the `wasi-common` crate,
primarily motivated with integration with the component model. This includes
features such as `async` which WASIp1 does not support. The `wasi-common` crate
is only used by the `wasmtime` CLI when the `-Stherads` flag is passed, which
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

*-Sthreads

Copy link
Copy Markdown
Member

@tschneidereit tschneidereit left a comment

Choose a reason for hiding this comment

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

This is a great writeup of the situation and what we discussed in the Wasmtime call—thank you!

@alexcrichton
Copy link
Copy Markdown
Member Author

This technically meets the criteria for FCP with two approvals, but given the nature of this change and amount of time this PR has been open I don't plan on starting FCP for another week or two to ensure folks have a chance to take a look at this.


* The [wasi-threads] proposal is fundamentally incompatible with the component
model due to component model intrinsics not having semantics across threads
(e.g. they all specifically assume single-threaded semantics and execution).c
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
(e.g. they all specifically assume single-threaded semantics and execution).c
(e.g. they all specifically assume single-threaded semantics and execution).

Copy link
Copy Markdown
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

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

Thanks for writing this up!

such.

Current spec-level effort for multithreading in WebAssembly is primarily focused
on the [shared-everything-proposal]. The instance-per-thread model on the web
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
on the [shared-everything-proposal]. The instance-per-thread model on the web
on the [shared-everything-threads] proposal. The instance-per-thread model on the web

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.

8 participants