C++ access from scala

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

C++ access from scala

Paul Weiss
Hi,

Are there any better alternatives to accessing C++ libraries from scala other than JNI.  Ideally would like to avoid copying data into the C++ memory space via off heap or other mechanism.  Have legacy C++ code libs that need integration with scala programs.

thanks,
-paul

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: C++ access from scala

Ruslan Shevchenko-2
  You can use offheap memory buffer. Same memory chunk can be viewed as MappedByteBuffer for java and mmap mapped region from C++/C  side.
 // Well-known project wich use this approach: https://github.com/real-logic/Aeron 


On Thu, Aug 25, 2016 at 6:43 PM Paul Weiss <[hidden email]> wrote:
Hi,

Are there any better alternatives to accessing C++ libraries from scala other than JNI.  Ideally would like to avoid copying data into the C++ memory space via off heap or other mechanism.  Have legacy C++ code libs that need integration with scala programs.

thanks,
-paul

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: C++ access from scala

Alex Cruise-2
In reply to this post by Paul Weiss
The cleanest thing I've seen is https://github.com/java-native-access/jna.

-0xe1a

On Thu, Aug 25, 2016 at 8:43 AM, Paul Weiss <[hidden email]> wrote:
Hi,

Are there any better alternatives to accessing C++ libraries from scala other than JNI.  Ideally would like to avoid copying data into the C++ memory space via off heap or other mechanism.  Have legacy C++ code libs that need integration with scala programs.

thanks,
-paul

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.