kud1ing / Rucaja
Licence: other
Calling the JVM from Rust via JNI
Stars: ✭ 35
Projects that are alternatives of or similar to Rucaja
Android Luajit Launcher
Android NativeActivity based launcher for LuaJIT, implementing the main loop within Lua land via FFI
Stars: ✭ 87 (+148.57%)
Mutual labels: jni, ffi
Dart native
Write iOS&Android Code using Dart. This package liberates you from redundant glue code and low performance of Flutter Channel.
Stars: ✭ 564 (+1511.43%)
Mutual labels: jni, ffi
Inline Java
Haskell/Java interop via inline Java code in Haskell modules.
Stars: ✭ 197 (+462.86%)
Mutual labels: jni, ffi
Flapigen Rs
Tool for connecting programs or libraries written in Rust with other languages
Stars: ✭ 473 (+1251.43%)
Mutual labels: jni
Rust V8worker2
Minimal Rust binding to V8 (based on ry/libv8worker2)
Stars: ✭ 33 (-5.71%)
Mutual labels: ffi
Kiss Fft
A compact FFT library in C with an Android JNI wrapper
Stars: ✭ 27 (-22.86%)
Mutual labels: jni
Jpype
JPype is cross language bridge to allow python programs full access to java class libraries.
Stars: ✭ 685 (+1857.14%)
Mutual labels: jni
Jnitrace
A Frida based tool that traces usage of the JNI API in Android apps.
Stars: ✭ 534 (+1425.71%)
Mutual labels: jni
Php Ffi Examples
Runnable examples to learn how PHP FFI works
Stars: ✭ 26 (-25.71%)
Mutual labels: ffi
Javassembly
💾 Calling Assembly from Java: simple example using the JNI and NASM.
Stars: ✭ 28 (-20%)
Mutual labels: jni
Fake Jni
An implementation of the JNI and JVMTI with support for direct interaction between natively registered classes and JVM objects.
Stars: ✭ 20 (-42.86%)
Mutual labels: jni
Core
MetaCall: The ultimate polyglot programming experience.
Stars: ✭ 596 (+1602.86%)
Mutual labels: ffi
Rust Python Example
Example of using Rust to Extend Python
Stars: ✭ 699 (+1897.14%)
Mutual labels: ffi
Anyndk
🔥 Android native library, make your development faster and easier. Android各种native库,让你的开发更快更简单
Stars: ✭ 35 (+0%)
Mutual labels: jni
Calling JVM code from Rust via JNI.
Usage
JNI calls are about 10-20 times slower than regular JVM instructions. It is adviced to call as few functions as possible that do as much work as possible.
Creating a flat Java wrapper class and producing a fat JAR with all the dependencies also reduces the amount of Rust interface code.
A more complete example is kud1ing/tinkerpop-rs which uses Rucaja to call Apache TinkerPop.
Platforms
The code is tested on Linux and macOS.
Your platform might need adjustments in build.rs
.
Mac
Trying to run may give:
dyld: Library not loaded: @rpath/libjvm.dylib
Referenced from: ./target/debug/rucaja
Reason: image not found
Abort trap: 6
this might require something like:
sudo ln -s $(/usr/libexec/java_home)/jre/lib/server/libjvm.dylib /usr/local/lib
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].