|
2 | 2 |
|
3 | 3 | Generate type-safe bindings for calling Java APIs from Rust, so you can fearlessly make your humongous Java spaghetti code aglomeration trascend language barriers and occupy an even larger fraction of the universe's space-time. |
4 | 4 |
|
| 5 | +## Features |
| 6 | + |
| 7 | +- Generates fully safe Rust bindings to call Java APIs. |
| 8 | +- Smart pointers based on `feature(arbitrary_self_types)`: `Global`, `Local`, `Arg`, `Return`. |
| 9 | +- Supports static and nonstatic methods, fields. |
| 10 | +- Constant fields (`static final`) are converted to Rust constants. |
| 11 | +- Allows implementing Java interfaces or subclassing Java classes using a "proxy" mechanism. Useful for callback/listener APIs. It generates: |
| 12 | + - a Rust trait matching the Java interface/class for you to implement |
| 13 | + - a proxy Java class where all methods call into Rust |
| 14 | + - Rust glue to receive and forward calls to the Rust trait |
| 15 | +- Flexible configuration based on glob rules matching Java classes. All matching rules are merged. |
| 16 | + |
| 17 | +## Users |
| 18 | + |
| 19 | +The following crates use java-spaghetti in the wild. You can use them as examples. |
| 20 | + |
| 21 | +- [`rnfc-android`](https://github.com/embassy-rs/rnfc/tree/master/rnfc-android) |
| 22 | +- [`bluest`](https://github.com/akiles-dev/bluest/tree/update-spaghetti/src/android) |
| 23 | + |
5 | 24 | ## Differences vs `jni-bindgen` |
6 | 25 |
|
7 | 26 | This project originally started out as a fork of [`jni-bindgen`](https://github.com/MaulingMonkey/jni-bindgen). |
@@ -40,8 +59,3 @@ at your option. |
40 | 59 | Unless you explicitly state otherwise, any contribution intentionally submitted |
41 | 60 | for inclusion in the work by you, as defined in the Apache-2.0 license, shall be |
42 | 61 | dual licensed as above, without any additional terms or conditions. |
43 | | - |
44 | | -<!-- https://doc.rust-lang.org/1.4.0/complement-project-faq.html#why-dual-mit/asl2-license? --> |
45 | | -<!-- https://rust-lang-nursery.github.io/api-guidelines/necessities.html#crate-and-its-dependencies-have-a-permissive-license-c-permissive --> |
46 | | -<!-- https://choosealicense.com/licenses/apache-2.0/ --> |
47 | | -<!-- https://choosealicense.com/licenses/mit/ --> |
|
0 commit comments