Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.
/ rucaja Public archive

Calling the JVM from Rust via JNI

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

kud1ing/rucaja

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rucaja (Rust calls Java) Build Status

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

at your option.

About

Calling the JVM from Rust via JNI

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages