wasm-learning icon indicating copy to clipboard operation
wasm-learning copied to clipboard

Run nodejs example with c api

Open Galaxy0106 opened this issue 4 years ago • 3 comments

Hello, I‘d like to ask if I can use the official c-api to run the wasm module compiled in this project(e.g. k-means), or maybe I need some other things?

Galaxy0106 avatar Dec 28 '21 12:12 Galaxy0106

What is the "official c-api" you refer to? Thanks.

juntao avatar Dec 29 '21 06:12 juntao

Thank you for the reply and what I mean is https://wasmedge.org/book/en/embed/c/ref.html.

Galaxy0106 avatar Dec 29 '21 06:12 Galaxy0106

The WasmEdge C API can load a WasmEdge VM and run standard WASM files. However, some examples in this repo are compiled with wasm-bindgen, and they require special handling in the host. We do not currently support 'wasm-bindgen` in the C API.

Going forward, we plan to migrate all wasm-bindgen examples to wasmedge-bindgen. Currently wasmedge-bindgen is supported in our GO SDK, but we plan to support it in our NODE addon and C API as well.

https://wasmedge.org/book/en/embed/go/function.html

juntao avatar Dec 29 '21 07:12 juntao