Use the wasmtime-cranelift for winch component trampolines#8082
Conversation
Subscribe to Label ActionDetailsThis issue or pull request has been labeled: "winch"Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
540fd4c to
6ae2b77
Compare
Subscribe to Label Actioncc @peterhuene DetailsThis issue or pull request has been labeled: "wasmtime:api", "wasmtime:config"Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
Label Messager: wasmtime:configIt looks like you are changing Wasmtime's configuration options. Make sure to
DetailsTo modify this label's message, edit the To add new label messages or remove existing label messages, edit the |
Instead of reimplementing the component trampolines directly in terms of Winch's
MacroAssemblertrait, reusewasmtime-cranelift'sCompilerimplementation to do that heavy lifting.I had to remove the type parameter from
CompiledFunctionand make it a boxeddyn Traitto make this work, due to the requirements ofCompiler::append_code, and the visibility ofModuleTextBuilderin the crate hierarchy. I think that this refactoring could be pushed further to avoid the need to have theCompilertrait interface produce&dyn Anyresults for compiled functions, but haven't looked into making changes further than what was needed to get component trampolines working here.We can push this work further to remove all trampoline generation from the
wasmtime-winchcrate, however I didn't want to bulk out the diff in this PR with that additional change, as it's not necessary for running components with winch.