Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

anyone tried GraalVM Python for this?


I looked into the this question for Graal Nodejs and I think it has the same problem in Python...

Basically Graal Python and Nodejs each provide a custom interpreter for the target lang, the main goal of which is to provide interoperability with the Graal polyglot ecosystem. So you can run your python code under the GraalPython interpreter and it will run JITed fast and can import libs from other Graal-supported langs.

But as far as outputting executable binaries, Graal only provides that for JVM projects and LLVM languages like C/C++/Rust.

So it's not impossible, but you have to build your own Java wrapper project that loads the Graal Python interpreter class in code and then runs your python lib inside that.

I expect eventually that boilerplate step can be automated as part of the Graal build tools.

If I've got this wrong I welcome any corrections!


I was half-remembering what I found when researching Graal Nodejs

clearer, less-garbled version as an answer here: https://stackoverflow.com/a/67331258/202168




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: