From 644f849bf87fe490d924f17a7c9780711e38c960 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Mon, 16 Dec 2024 22:54:13 +0100 Subject: [PATCH] Add speaker notes to `bindgen` slides (#2491) Part of #1083. --- src/android/interoperability/with-c/bindgen.md | 11 +++++++++++ src/android/interoperability/with-c/hand-written.md | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/src/android/interoperability/with-c/bindgen.md b/src/android/interoperability/with-c/bindgen.md index 541b5833..3470b6eb 100644 --- a/src/android/interoperability/with-c/bindgen.md +++ b/src/android/interoperability/with-c/bindgen.md @@ -73,3 +73,14 @@ _interoperability/bindgen/Android.bp_: ```shell {{#include ../../build_all.sh:libbirthday_bindgen_test}} ``` + +
+ +- The Android build rules will automatically call `bindgen` for you behind the + scenes. + +- Notice that the Rust code in `main` is still hard to write. It is good + practice to encapsulate the output of `bindgen` in a Rust library which + exposes a safe interface to caller. + +
diff --git a/src/android/interoperability/with-c/hand-written.md b/src/android/interoperability/with-c/hand-written.md index a060cba2..8d7f3138 100644 --- a/src/android/interoperability/with-c/hand-written.md +++ b/src/android/interoperability/with-c/hand-written.md @@ -19,3 +19,10 @@ We already saw this in the > This assumes full knowledge of the target platform. Not recommended for > production. + +
+ +- This is just a motivating example. For a real library, you want to use + `bindgen` as shown on the next slide. + +