Project

Profile

Help

Feature #6287

open

User extension function for the C++, PHP and Python APIs

Added by O'Neil Delpratt 11 months ago. Updated 4 months ago.

Status:
In Progress
Priority:
Normal
Category:
Saxon-C Internals
Start date:
2023-12-15
Due date:
% Done:

0%

Estimated time:
Applies to branch:
12
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
12.4.1
Fixed in version:
SaxonC Languages:
All
SaxonC Platforms:
All
SaxonC Architecture:

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".

Actions #1

Updated by O'Neil Delpratt 4 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).

Please register to edit this issue

Also available in: Atom PDF