wasm-tools icon indicating copy to clipboard operation
wasm-tools copied to clipboard

[meta] Support for the component model

Open fitzgen opened this issue 2 years ago • 3 comments

Here is a list of what is required to migrate Bytecode Alliance projects to the new module linking spec that is based on the component model, rather than the old module linking spec that was based on core Wasm. Putting this list in the wasm-tools repo because most of the crates are here, and the work needs to start here. Let me know if I'm missing something and/or just edit this issue to add a checkbox for the missing item!

  • [x] wasmparser (@peterhuene) PR: #484

  • [x] wat and wast (@sunfishcode) PR: #621

  • [x] wasm-encoder (@peterhuene) PR: #448

  • [x] wasmprinter (@peterhuene) PR: #496

    • (depends on wasmparser)
  • [ ] wasm-smith (@fitzgen)

    • (depends on wasm-encoder)
  • [ ] wasm-mutate

    • (depends on wasm-encoder)
  • [x] wasm-tools local tests

    • (depends on wat, wasmparser)
  • [ ] wasm-tools fuzz targets

    • (depends on wat, wasmparser, wasmprinter, and wasm-smith)
  • [x] wasm-tools dump PR: https://github.com/bytecodealliance/wasm-tools/pull/549

    • (depends on wat, wasmparser)
  • [x] wasm-tools objdump PR: https://github.com/bytecodealliance/wasm-tools/pull/555

    • (depends on wat, wasmparser)
  • [ ] Wasmtime: https://github.com/bytecodealliance/wasmtime/issues/4185

    • (depends on wat, wasm-encoder, and wasmparser)
  • [ ] wit-bindgen

    • (depends on wat, wasm-encoder, wasmparser, and Wasmtime)
  • [ ] Wizer (https://github.com/bytecodealliance/wizer/issues/48)

    • (depends on wat, wasm-encoder, wasmparser, and Wasmtime)
  • [ ] Interface Types + Canonical ABI test case generator

cc @peterhuene @alexcrichton @tschneidereit @lukewagner

fitzgen avatar Jan 20 '22 19:01 fitzgen

Thanks for putting this together, Nick!

I have a PR up for both wasm-encoder and wasmparser currently. An updated component model binary grammar is forthcoming soon, so I will revise both of those PRs with the new grammar as it should help reduce the complexity of those implementations greatly.

peterhuene avatar Jan 20 '22 20:01 peterhuene

As this work is disruptive to the existing module linking implementation and there will be, at times, the need to disable tests to land parts of the above work, we're going to land these changes in the component-model branch of this repository. A checkmark on the list above indicates the changes have been merged into the component-model branch.

Once the tools in this repo have been updated, tested, and fuzzed, we'll then think about the timing to merge the component-model branch into main.

peterhuene avatar Feb 03 '22 21:02 peterhuene

Just a heads up: https://github.com/WebAssembly/component-model/pull/29 will require a bunch of changes in the encoder, parser+validator, and wasm-smith.

fitzgen avatar May 05 '22 17:05 fitzgen

I think this is done-enough at this point that I think this issue has served it's purpose and I'm going to close this. There are still remaining work items like wasm-mutate, wasm-smith, wizer, and wit-bindgen, but those are either going to get implemented on an as-needed basis or are so significant that tracking them here won't help them along.

alexcrichton avatar Sep 12 '22 20:09 alexcrichton