-
Notifications
You must be signed in to change notification settings - Fork 80
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
GraalVM native #358
Comments
This is a good idea that has been at the back of my mind ever since I made sure PL/Java works with GraalVM, but I have not had time to test the More of my effort at the moment is going toward refactoring PL/Java to make GraalVM polyglot languages more naturally accessible. But |
oracle/graal#2761 looks relevant, and if I'm reading it correctly, the right stuff should be there now since GrallVM 21.0. Sounds like it will need some kind of configuration file to say what classes and methods will need to be included for method handles to point to. But that would be trivial to generate from |
I don't know enough to comment. I do know that they were very helpful on the Graal Slack and though this was a cool use of Graal. They seemed to think that this was totally possible. I just had a hard time understanding the syntax for making function calls, and also how to instantiate and manage the "Agent Isolate", which is apparently a giant uber object that manages memory, threads and everything. Somehow you have to create this object, maintain a reference to it, and pass it in as the first parameter on every function call from the outside world. |
Is it possible to use the GraalVM native compiler to create a binary, and use that as an extension?
I asked about this on the Graal Slack quite some time ago, and they suggested that yes, it was possible to create a C-compatible .so library, but the instructions for doing so were unclear. They did identify these starting points:
https://github.com/kirillp/graalSamples/tree/master/simpleApp
https://github.com/oracle/graal/blob/master/substratevm/src/com.oracle.svm.jvmtiagentbase/src/com/oracle/svm/jvmtiagentbase/AgentIsolate.java
I think that if we could get true native speed from a Postgres extension written in Java, or any polyglot language, it would be a real game-changer.
The text was updated successfully, but these errors were encountered: