-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to export a value? #60
Comments
It's not clear what "works" mean. I guess it depends a bit when |
What VScode prompts when I use the I am not sure how I can debug that, the generated code is complex. What changes seems to be the following lines: With activate =
(* ... *)
caml_call1(caml_call1(Js_of_ocaml_Js[50], "activate"), activate);
var Dune_exe_Main = [0];
runtime.caml_register_global(16, Dune_exe_Main, "Dune__exe__Main");
return;
}
(globalThis)); While with the
|
Perhaps @hhugo can shed a light ? |
For reference this is how |
Could you perhaps try to rename the |
I have tried to rename the OCaml value but I get the same error. |
I am writing a VScode extension using the
Brr
library.I don't have a minimal reproducible example but here is my snippet:
If I uncomment the
Js.export
line, it works, but theJv.set
does not.I am not sure to understand what is going on. I observe the compiled JS is a little bit different. In particular
Js.export
uses "jsoo_exports` value.I have tried to read the FFI cookbook, but I did not find an explanation. Is this expected? Why?
The text was updated successfully, but these errors were encountered: