I'm too sure whether the issue I'm having is with the ocaml wasm compiler or with the bytecodealliance's runtime (wamr).
I've wrote a simple ocaml program:
let _ = Printf.printf "Hello")
compiled it with:
ocamlfind ocamlc -package js_of_ocaml -linkpkg -o hello.byte hello.ml
generated the wasm:
wasm_of_ocaml hello.byte
After building the wamr runtime with the following flags ...
-DWAMR_BUILD_TAIL_CALL=1
-DWAMR_BUILD_EXCE_HANDLING=1
-DWAMR_BUILD_GC=1
... I was able to run a simple wasm file generated from C.
When attempting to run the ocaml wasm file I got the following error:
WASM module load failed: type mismatch: expect (ref ht) but got other
So, could anyone suggest possible ways for me to narrow down the cause of the error?
I'm too sure whether the issue I'm having is with the ocaml wasm compiler or with the bytecodealliance's runtime (wamr).
I've wrote a simple ocaml program:
let _ = Printf.printf "Hello")compiled it with:
ocamlfind ocamlc -package js_of_ocaml -linkpkg -o hello.byte hello.mlgenerated the wasm:
wasm_of_ocaml hello.byteAfter building the wamr runtime with the following flags ...
... I was able to run a simple wasm file generated from C.
When attempting to run the ocaml wasm file I got the following error:
WASM module load failed: type mismatch: expect (ref ht) but got otherSo, could anyone suggest possible ways for me to narrow down the cause of the error?