2 ms·
Julia can call out to C functions[0], but can C functions call into Julia? There are several aspects to this: - Julia cannot generate linkable shared librarie
by ihnorton 13y ago
Julia can call out to C functions[0], but can C functions call into Julia?
There are several aspects to this:
- Julia cannot generate linkable shared libraries, yet.
- There is a fairly small "libjulia" C API (the embedding reference in another comment), but this is a means to interact with/control the program "julia" (for dynamic interop. or IDE use, for example). "libjulia" does not export symbols for arbitrary Julia code.
- It is possible to generate a C-callable function pointer from a Julia function at runtime and to pass this into a C routine controlled by Julia (for example, to pass a comparator to a sorting routine, or an objective function to an optimizer).