C++ access from scala

127 views
Skip to first unread message

Paul Weiss

unread,
Aug 25, 2016, 11:43:23 AM8/25/16
to scala-language
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

Ruslan Shevchenko

unread,
Aug 25, 2016, 11:59:30 AM8/25/16
to scala-language
  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 


--
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 scala-languag...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Cruise

unread,
Sep 7, 2016, 4:27:55 PM9/7/16
to scala-l...@googlegroups.com
The cleanest thing I've seen is https://github.com/java-native-access/jna.

-0xe1a

--
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 scala-language+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages