Can llvm execute code from managed languages?

I am making an application and I would like to download and execute the llvm bitcode using ExecutionEngine. I managed to do this with really simple C code compiled with clang.

My thought is that if I use llvm for this project, then it can be more an agnostic of the language than say, in particular, for choosing lua / python / javascript. But I'm confused about how this might work for managed or scripted languages, as they are often platform bound with resources such as GC. So I'm not sure how this will work through ExecutionEngine.

So, as an example of a script, suppose a user wants to write python code that works in my application. Then I want them to deliver me a bitcode representing this Python code, which I then ran in my C ++ application using llvm ExecutionEngine.

Is it possible? Can python just compile to bitcode and then run later with ExecutionEngine? If not, what do I need to know to understand why not?

+4
source share
1 answer

, , ExecutionEngine, , , C-. , lua/python/javascript ontop llvm, . script, .

, script llvm ().

0

All Articles