ocsigen / js_of_ocaml

Compiler from OCaml to Javascript.
http://ocsigen.org/js_of_ocaml/
Other
947 stars 185 forks source link

Dynamically link runtime js files #1508

Closed gpetiot closed 4 months ago

gpetiot commented 12 months ago

Hi, I'm taking over the work initiated by @jonludlam to make modules executables in toplevel (for the documentation on ocaml.org).

We were wondering if there was a way of dynamically linking the runtime.js files of some packages (eg. https://github.com/janestreet/base/blob/master/src/runtime.js) when initializing the toplevel, instead of when building the toplevel. It would be very nice to not have to build a new toplevel for each package.

I had a look at https://ocsigen.org/js_of_ocaml/latest/manual/runtime-files but it only mentions the build, and I didn't find anything in the jsoo cmdline or the API. Is that something possible? or is there an alternative? thanks.

(addressed by #1509)

hhugo commented 4 months ago

fixed by #1509