redoC-A2k opened issue #8513:
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 usingcargo 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 ?
redoC-A2k edited issue #8513:
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 usingcargo 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 ?
redoC-A2k edited issue #8513:
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 usingcargo 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 ?
alexcrichton commented on issue #8513:
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.
Last updated: Dec 23 2024 at 12:05 UTC