Feature #6287
openUser extension function for the C++, PHP and Python APIs
0%
Description
SaxonC 12 currently does not support user extension functions written in the languages C++, PHP and Python.
We used to support this feature in SaxonC 11, but since we have moved from using Excelsior Jet to Graalvm as the underlying JVM engine it is no longer straightforward to reuse the JNI mechanism to do the callbacks for the extension functions.
Following a user request on stackoverflow (i.e. https://stackoverflow.com/questions/77641333/use-external-user-python-functions-in-a-xml-or-xslt-by-using-saxonc-12-4-for-pyt), I am adding this issue as a feature request for SaxonC 12.
On the Graalvm slack I have been advised that we can call C/C++ method from Java code in native using CFunction.
Also to consider that "C++ method is hard, you need a C proxy that calls desired method".
Updated by O'Neil Delpratt 5 months ago
- Status changed from New to In Progress
- Applies to branch 12 added
- SaxonC Languages All added
- SaxonC Platforms All added
Update:
There has been significant progress in the support of user defined extension functions in C/C++.
See the fork of this project: https://github.com/ond1/graalSamples/tree/master/simpleApp
With the help of the author we have a working prototype. The sample app illustrates the calling of a C function exported from an executable and called from Java (i.e. graalvm).
Updated by O'Neil Delpratt 28 days ago
- Assignee changed from O'Neil Delpratt to Matt Patterson
Please register to edit this issue