wasmtime icon indicating copy to clipboard operation
wasmtime copied to clipboard

Tracking issue for implementing the component model

Open alexcrichton opened this issue 2 years ago • 2 comments

This is intended to be a tracking issue for the implementation of the component model proposal of WebAssembly. I'm in the progress of implementing this with work in Wasmtime starting at https://github.com/bytecodealliance/wasmtime/pull/4005 and continuing in further PRs. I hope to leave checkbox items here to ensure I don't forget about them and to also track the progress of implementing the component model.

Items to be implemented

Separate work items

I'm starting to separate off work items from this issue to separate tracking issues with more detail. These will all need completion to finish the component model work but these issues are suitable to be picked up by anyone in theory.

Unsure how to implement so far

  • Everything with value ranging from imports to exports to the start function
  • Type imports
  • Unsure how to rationalize performance concerns with validating indirect values like lists from wasm coming to the host when balanced with spec-desired behavior of validating everything.

Open questions

Not planned at this time

alexcrichton avatar May 24 '22 18:05 alexcrichton

Hi, do we have a rough estimate on the component-model release? I am trying to understand even there's some pending items, is it working now? Is there a quickstart guidance on the usage?

Jeffwan avatar Jul 11 '22 23:07 Jeffwan

There's no esimate at this time. Some parts work but not all, the un-finished issues above should give an idea of how much is left to do. No documentation on usage yet.

alexcrichton avatar Jul 12 '22 13:07 alexcrichton

Once all the boxes are checked don't forget a 'hello component' minimal example.

pannous avatar Jan 04 '23 10:01 pannous

Hey @alexcrichton, what's the relationship of this issue with #6370? Are you still actively tracking issues here, or is the state of landing WASI preview 2 support a better proxy for component model progress in wasmtime?

bobby avatar Jul 31 '23 22:07 bobby

It depends on why you need to know.

If you are trying to contribute to the component model or WASI design and implementation, they are separate standards where WASI builds on the component model, but only using the pieces that are complete in this list. For example, now that component model resources are complete here in wasmtime and are nearing completion out in wit-bindgen and other tools, we'll be swapping out our u32 placeholders for proper resources in WASI shortly.

If you are just looking to write or embed components, you want both the component model and WASI to be stable: right now their definitions are still in flux, and wasmtime's implementations may not even match the spec definitions. We intend to stabilize both of those, in both spec and implementation, as Preview 2 later this year. The full set of implementation work required to finish Preview 2 isn't captured anywhere right now, but we do have a rough plan on the spec side: https://github.com/WebAssembly/WASI/pull/550

pchickey avatar Jul 31 '23 22:07 pchickey

I'll add to what @pchickey said already and note that this issue has I think outlived its usefulness. At this time all major efforts for implementing the component model have finished except for the never-ending continued polish in addition to the preview2 implementation (which involves shaping and stabilizing preview2 as well).

In light of that I'm going to go ahead and close this as the component model implementation in Wasmtime is more-or-less complete (with usefulness coming with other preview2-related things). Any follow-ups and remaining items should be opened as separate issues at this point for separate discussion.

alexcrichton avatar Aug 04 '23 23:08 alexcrichton