Skip to content

Commit

Permalink
Add speaker notes to JNI slide (#2495)
Browse files Browse the repository at this point in the history
Part of #1083.
  • Loading branch information
mgeisler authored Dec 5, 2024
1 parent 69d4fc1 commit 54e0eab
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/android/interoperability/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,14 @@ Finally, you can build, sync, and run the binary:
```shell
{{#include ../build_all.sh:helloworld_jni}}
```

<details>

- The `unsafe(no_mangle)` attribute instructs Rust to emit the
`Java_HelloWorld_hello` symbol exactly as written. This is important so that
Java can recognize the symbol as a `hello` method on the `HelloWorld` class.

- By default, Rust will mangle (rename) symbols so that a binary can link in
two versions of the same Rust crate.

</details>

0 comments on commit 54e0eab

Please sign in to comment.