Example 1: Export C Functions to WASM
The related code/working directory of this example resides in directory {WAMR_DIR}/samples/basic
The "basic" sample project
Build this sample
$ ./build.shRun the sample
$ cd ./out/
$
$ ./basic -f wasm-apps/testapp.wasm
calling into WASM function: generate_float
Native finished calling wasm function generate_float(), returned a float value: 102009.921875f
calling into WASM function: float_to_string
calling into native function: intToStr
calling into native function: get_pow
calling into native function: intToStr
Native finished calling wasm function: float_to_string, returned a formatted string: 102009.921Last updated