Closed
Description
Describe the bug
-
Clone the project https://github.com/adept/ocaml-canvas-test
-
Build it with
dune build canvas.bc.js
-
Run it with index.html supplied
-
Observe runtime error
canvas.bc.js:164237 Uncaught ReferenceError: caml_gr_state_create is not defined
at open_canvas (canvas.bc.js:164237)
at caml_call1 (canvas.bc.js:164415)
at onload (canvas.bc.js:164438)
at caml_call1 (canvas.bc.js:152942)
at canvas.bc.js:154769
Indeed, there is no caml_gr_state_create
in scope (but there is jsoo_runtime.caml_gr_state_create
)
-
Build the project with "dune build --release canvas.bc.js"
-
Observe that it is working now.
Expected behavior
Non-release build should work as well
Versions
- ocamlc 4.09.1
- js_of_ocaml 3.6.0