Skip to content
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

Dynlink support #88

Open
vouillon opened this issue Oct 4, 2024 · 0 comments
Open

Dynlink support #88

vouillon opened this issue Oct 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@vouillon
Copy link
Collaborator

vouillon commented Oct 4, 2024

It would be cool to be able to run an OCaml toplevel or Coq in a browser.

Directly loading wasma/wasmo files should be easy. Maybe we want to provide a way to turn them into a directory containing the Wasm code and a source map?

Dynlink for cmo / cma files would require more work. One need to embed some bytecode metadata. The linking convention might be a different as well (going through an array of global data).

Js_of_ocaml provides a virtual filesystem that can contain the libraries and the cmi files. We probably want to implement this functionality as well. Alternatively, with the JSPI API, it should be possible to load these files asynchronously from the Web server.

Finally, to compile cmo files we will need to embed wasm_of_ocaml. But we probably do not want to embed Binaryen as well. So we probably want to generate Wasm binary modules directly (see #90).

@vouillon vouillon added the enhancement New feature or request label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant