KO
|
EN
gitlite — search
Search
#python
#typescript
#discord-bot
#vue
#machine-learning
#game
#discord
#artificial-intelligence
#react
#java
#cpp
#bot
rucaja
★ 30
Open GitHub ↗
Calling the JVM from Rust via JNI
Download README (.md)
Explore Similar Repositories
good
:
The Good Programming Language
WOWRibbonView
:
Ribbon view for iOS in Swift 3
website-fingerprinting
:
Automatic Feature Generation for Website Fingerprinting
influent
:
A Fluentd server running on the JVM
front-weekly
:
OpenDigg前端开源项目周报
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
rucaja
?
Download (.md)
# Rucaja (Rust calls Java) [](https://travis-ci.org/kud1ing/rucaja) 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](https://github.com/kud1ing/tinkerpop-rs) which uses Rucaja to call [Apache TinkerPop](https://tinkerpop.apache.org). ## 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](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) at your option.