Skip to content

Conversation

copy
Copy link
Contributor

@copy copy commented Jan 26, 2022

Fixes #2. This set of commits changes the public api to allow using ocaml-jit as a mechanism similar to dynlink (or eval in dynamic languages). Instead of init_top we expose jit_load and jit_lookup_symbol. Additionally I expose Symbols, Address and Globals in order to be able to pass symbols from external libraries (eventually I'd like to remove Global.symbols and pass them to jit_load, which should also make unloading easier).

I also added a simple eval example. It uses quite a bit of OCaml's internal apis (although not much more than ocaml-jit itself). I'm not sure how maintainable it will be between compiler changes, but it should serve as a nice demonstration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use as as Dynlink-like extension mechanism
1 participant