pan3793 commented on PR #59313:
URL: https://github.com/apache/spark/pull/59313#issuecomment-6078818746

   > we have to release header file together whereas JNI one does not require 
it.
   
   for JNI, we define the **interface** via a Java class (`NativeBridge`), and 
the developer uses `javap` to generate the header file; for FFM, we define a 
header file as the **interface** directly.
   
   I suppose, from the developer's perspective, the latter should be more 
friendly (hygienic, and save one step to generate it from Java).
   
   If we choose to define a header file as the **interface** directly, we can:
   
   - for Java 17 and 21: Spark provides a JNI bridge to call it
   - for Java 25 and later: Spark uses the FFM API to call it directly
   
   and once we raise our JDK baseline to 25+, we can get rid of the JNI glue 
code, the ABI keeps no change from the beginning.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to