Zhangyx24 opened issue #4423:
Question
I want to excute the following wasm program :
test.txt
,but how to pass the externref parameter?
Zhangyx24 edited issue #4423:
Question
I want to excute the following wasm program :
<img width="510" alt="截屏2022-07-09 下午10 11 01" src="https://user-images.githubusercontent.com/28601300/178109442-9fe6214e-14e5-4167-a377-0263e27ebd87.png">test.txt
,but how to pass the externref parameter?
bjorn3 commented on issue #4423:
I don't think you can. What would you put in the externref anyway? It is an opaque reference to a value of any type in the embedder.
Zhangyx24 commented on issue #4423:
Do you mean that it can only be used in the host high-level language api ?
Could you please give me a simple example?
bjorn3 commented on issue #4423:
I think so. Here is an example of storing a string in an
ExternRef
: https://github.com/bytecodealliance/wasmtime/blob/6c70428735d87314a7568542939e1e74f79f7871/examples/externref.rs#L22
bjorn3 edited a comment on issue #4423:
I think so. Here is an example of storing a string in an
ExternRef
(see the rest of this file for a full example of how to use it): https://github.com/bytecodealliance/wasmtime/blob/6c70428735d87314a7568542939e1e74f79f7871/examples/externref.rs#L22
alexcrichton commented on issue #4423:
Yes there's no way right now to invoke a wasm function that takes an
externref
from the command line. That would need to be done using the embedding API linked above.
alexcrichton closed issue #4423:
Question
I want to excute the following wasm program :
<img width="510" alt="截屏2022-07-09 下午10 11 01" src="https://user-images.githubusercontent.com/28601300/178109442-9fe6214e-14e5-4167-a377-0263e27ebd87.png">test.txt
,but how to pass the externref parameter?
Zhangyx24 commented on issue #4423:
Thanks a lot !
Last updated: Nov 22 2024 at 17:03 UTC