Skip to content

Commit 9e564e9

Browse files
committed
Readme is more worth reading now.
1 parent 511bdb1 commit 9e564e9

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
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.
44

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+
524
## Differences vs `jni-bindgen`
625

726
This project originally started out as a fork of [`jni-bindgen`](https://github.com/MaulingMonkey/jni-bindgen).
@@ -40,8 +59,3 @@ at your option.
4059
Unless you explicitly state otherwise, any contribution intentionally submitted
4160
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
4261
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

Comments
 (0)