Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Document binding codegen shortcuts

Manav Rathie10af4823402
diff --git a/mobile/apps/photos/README.md b/mobile/apps/photos/README.md
index a89cfcf202..addff4f7d2 100644
--- a/mobile/apps/photos/README.md
+++ b/mobile/apps/photos/README.md
@@ -58,7 +58,13 @@ You can alternatively install the build from PlayStore or F-Droid.
> [!NOTE]
>
-> Re-run `cargo codegen frb` whenever the Rust APIs exposed through Flutter Rust Bridge under `rust/bindings/frb` change.
+> Re-run `cargo codegen frb` whenever the FRB-exported surface under `rust/bindings/frb/` changes. Internal Rust changes (function bodies, private helpers) are picked up by the normal Flutter build.
+>
+> From anywhere in the repo:
+>
+> ```sh
+> (cd "$(git rev-parse --show-toplevel)/rust" && cargo codegen frb)
+> ```
To build a release APK, [setup your keystore](https://docs.flutter.dev/deployment/android#create-an-upload-keystore) and run `flutter build apk --release --flavor independent`. For iOS, use `flutter build ios`.
diff --git a/mobile/native/android/apps/ensu/README.md b/mobile/native/android/apps/ensu/README.md
index 274d6118c2..300c812f75 100644
--- a/mobile/native/android/apps/ensu/README.md
+++ b/mobile/native/android/apps/ensu/README.md
@@ -17,13 +17,17 @@ To know more about Ente, see [our main README](../../../../../README.md) or visi
3. Open the project in Android Studio and run the `app-ui` module. If the Android NDK is missing, Android Studio will prompt to install it.
-That's it. Apart from the `cargo codegen`, this is a normal Android project.
+That's it. Apart from the `cargo codegen`, this is a normal Android project. Gradle cross-compiles the Rust libraries to JNI `.so` files automatically when building the app.
> [!NOTE]
>
-> Re-run `cargo codegen native` whenever the UniFFI interface under `rust/bindings/uniffi` changes.
+> Re-run `cargo codegen native` whenever the UniFFI-exported surface under `rust/bindings/uniffi/` changes. Internal Rust changes (function bodies, private helpers) are picked up by the normal Gradle build.
>
-> Gradle cross-compiles the Rust libraries to JNI `.so` files automatically when building the app.
+> From anywhere in the repo:
+>
+> ```sh
+> (cd "$(git rev-parse --show-toplevel)/rust" && cargo codegen native)
+> ```
A custom endpoint can be baked into the build via `./gradlew :app-ui:installDebug -PENTE_API_ENDPOINT=http://localhost:8080`, or by exporting `ENTE_API_ENDPOINT` before running Gradle.
diff --git a/mobile/native/darwin/Apps/Ensu/README.md b/mobile/native/darwin/Apps/Ensu/README.md
index 62bf60eef3..dad212908f 100644
--- a/mobile/native/darwin/Apps/Ensu/README.md
+++ b/mobile/native/darwin/Apps/Ensu/README.md
@@ -15,13 +15,17 @@ Source code for the Ensu iOS app.
3. Open `Ensu.xcodeproj` in Xcode and run the `Ensu` scheme.
-That's it. Apart from the `cargo codegen`, this is a normal iOS project.
+That's it. Apart from the `cargo codegen`, this is a normal iOS project. Xcode compiles and statically links the Rust libraries automatically when building the app.
> [!NOTE]
>
-> Re-run `cargo codegen native` whenever the UniFFI interface under `rust/bindings/uniffi` changes.
+> Re-run `cargo codegen native` whenever the UniFFI-exported surface under `rust/bindings/uniffi/` changes. Internal Rust changes (function bodies, private helpers) are picked up by the normal Xcode build.
>
-> Xcode compiles and statically links the Rust libraries automatically when building the app.
+> From anywhere in the repo:
+>
+> ```sh
+> (cd "$(git rev-parse --show-toplevel)/rust" && cargo codegen native)
+> ```
A custom endpoint can be baked into the build via `xcodebuild ENTE_API_ENDPOINT=http://localhost:8080 ...` or by editing the user-defined `ENTE_API_ENDPOINT` build setting in the `Ensu` target.