You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose I wrote some code in rust which have exported extern functions annonated #[export_name = "..."] macro and I also have trait implmentation of exported functions through wit .
So after doing compilation to wasm using cargo build --target=wasm32-wasi , I get core wasm module which then I convert to component model using wasm-tools component new ... adapt ...
Now in my main function in host I want to call both annonated exported function as well as exported through wit .
How can I ?
The text was updated successfully, but these errors were encountered:
redoC-A2k
changed the title
Is it possible to use core wasm module functionalities from component wasm ?
Is it possible to use core wasm module functionalities along with component wasm ?
May 1, 2024
I believe the general answer to your question is "no". A component has its own exports/imports and you can't reach inside and fiddle with internal modules through a component boundary. You'd need to have custom WIT to model your custom #[export_name] for that to get plumbed through the componentization process.
Suppose I wrote some code in rust which have exported extern functions annonated
#[export_name = "..."]
macro and I also have trait implmentation of exported functions through wit .So after doing compilation to wasm using
cargo build --target=wasm32-wasi
, I get core wasm module which then I convert to component model usingwasm-tools component new ... adapt ...
Now in my main function in host I want to call both annonated exported function as well as exported through wit .
How can I ?
The text was updated successfully, but these errors were encountered: