#jvm #jni #bindgen #android

bin+lib jni-bindgen

Code generator for binding to JVM APIs from Rust

7 releases

✓ Uses Rust 2018 edition

0.0.9 Aug 26, 2019
0.0.8 Aug 16, 2019

#37 in FFI

Download history 23/week @ 2019-08-05 46/week @ 2019-08-12 27/week @ 2019-08-19 87/week @ 2019-08-26 40/week @ 2019-09-02 24/week @ 2019-09-09 46/week @ 2019-09-16 24/week @ 2019-09-23 21/week @ 2019-09-30 3/week @ 2019-10-07 21/week @ 2019-10-14 67/week @ 2019-10-21

51 downloads per month

MIT/Apache

180KB
3K SLoC

jni-bindgen

GitHub Build Status unsafe: yes rust: 1.36.0+ Open issues License dependency status

Work in progress, only barely kinda partially usable

Vaguely inspired by, but otherwise unrelated to, bindgen and wasm-bindgen's WebIDL stuff.

Generate Rust JVM FFI wrappers around APIs defined by .jar or .class files, because maintaining your own hand-written bindings is an exercise in boredom, soundness bugs, and pain.

Goals

  • Provide a means of using Android system APIs specifically.
  • Provide a means of using Java, Kotlin, Scala, or other JVM based APIs.
  • Automatically link API documentation, so people might actually read it.
  • Eliminate the need to manually write unsound, unreviewed, and unaudited unsafe { ... } APIs

Local Crates

github.com crates.io docs.rs Description
jni-android-sys Crates.io Docs Bindings to Android Java APIs
jni-android-sys-gen N/A N/A Generates jni-android-sys
jni-bindgen Crates.io Docs Generator of Java API bindings
jni-glue Crates.io Docs Utility functions for Java API bindings

External Crates / Plugins

github.com package docs License Where
jni-sys Crates.io Docs License
rust-android-gradle gradle.org README.md License Examples

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~2–2.7MB
~51K SLoC