Skip to content

Minor changes for components related to wit-bindgen support - #5053

Merged
alexcrichton merged 3 commits into
bytecodealliance:mainfrom
alexcrichton:wit-bindgen-pieces
Oct 13, 2022
Merged

alexcrichton merged 3 commits into
bytecodealliance:mainfrom
alexcrichton:wit-bindgen-pieces

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

My plan for wit-bindgen is to use the wasmtime-environ crate to parse an input component binary to generate host bindings. Leveraging wasmtime-environ should help offload almost all of the really complex handling of things like adapter modules, dataflow within a component, what exactly needs lifting/lowering where, etc. To that end though I have a few changes here for miscellaneous support in wit-bindgen of pieces required.

This commit adds some more plumbing for type exports to ensure that they
show up in the final compiled representation of a component. For now
they continued to be ignored for all purposes in the embedding API
itself but I found this useful to explore in `wit-bindgen` based tooling
which is leveraging the component parsing in Wasmtime.
This commit adds a field to be able to refer back to the original wasm
binary for a `ModuleTranslation`. This field is used in the upcoming
support for host generation in `wit-component` to "decompile" a
component into core wasm modules to get instantiated. This is used to
extract a core wasm module from the original component.
@alexcrichton
alexcrichton requested a review from pchickey October 13, 2022 14:54
@github-actions github-actions Bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Oct 13, 2022
@github-actions

Copy link
Copy Markdown
Contributor

Subscribe to Label Action

cc @peterhuene

Details This issue or pull request has been labeled: "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

  • peterhuene: wasmtime:api

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@alexcrichton
alexcrichton merged commit ff0c45b into bytecodealliance:main Oct 13, 2022
@alexcrichton
alexcrichton deleted the wit-bindgen-pieces branch October 13, 2022 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants