wasm_component_layer icon indicating copy to clipboard operation
wasm_component_layer copied to clipboard

resource transfer trampolines are unimplemented

Open juntyr opened this issue 1 year ago • 2 comments

First of all, thank you for your work on this amazing crate - I really hope it becomes a standard API to write runtime-independent code running WASM components :)

I am currently trying to port my WASM modules to components and to switch from a custom runtime abstraction to wasm_runtime_layer. My components use WASI but are composed with a dummy WASI implementation that ensures all calls have deterministic behaviour. Unfortunately, when I try to instantiate the composed component with wasm_component_layer, the crate crashes on a trampoline being unimplemented. I cross-checked with jco, which also doesn't support all trampolines yet but matches on them exhaustively, and was thus able to see that the missing trampoline is ResourceTransferOwn. For reference, wasmtime implements them here: https://github.com/bytecodealliance/wasmtime/blob/main/crates/cranelift/src/compiler/component.rs#L69-L115

How difficult do you think would it be to implement the missing trampolines for the wasm_component_layer?

juntyr avatar Feb 03 '24 10:02 juntyr