Skip to content

Commit 54e0eab

Browse files
authored
Add speaker notes to JNI slide (#2495)
Part of #1083.
1 parent 69d4fc1 commit 54e0eab

File tree

1 file changed

+11
-0
lines changed
  • src/android/interoperability

1 file changed

+11
-0
lines changed

src/android/interoperability/java.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,14 @@ Finally, you can build, sync, and run the binary:
3838
```shell
3939
{{#include ../build_all.sh:helloworld_jni}}
4040
```
41+
42+
<details>
43+
44+
- The `unsafe(no_mangle)` attribute instructs Rust to emit the
45+
`Java_HelloWorld_hello` symbol exactly as written. This is important so that
46+
Java can recognize the symbol as a `hello` method on the `HelloWorld` class.
47+
48+
- By default, Rust will mangle (rename) symbols so that a binary can link in
49+
two versions of the same Rust crate.
50+
51+
</details>

0 commit comments

Comments
 (0)