#jvm #jni #bindgen #android

bin+lib jni-bindgen

Code generator for binding to JVM APIs from Rust

6 releases

✓ Uses Rust 2018 edition

new 0.0.8 Aug 16, 2019
0.0.7 Aug 16, 2019

#34 in FFI


Used in 1 crate

MIT/Apache

167KB
3K SLoC

jni-bindgen

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

github.com crates.io docs.rs
jni-android-sys Crates.io Docs
jni-bindgen Crates.io Docs
jni-glue Crates.io Docs

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

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

~4MB
~67K SLoC