Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob] Separate bootstrap and rust codegen commands

Prateek Sunal7d0449d84115
diff --git a/mobile/apps/photos/README.md b/mobile/apps/photos/README.md
index a919691f59..6d030f1b06 100644
--- a/mobile/apps/photos/README.md
+++ b/mobile/apps/photos/README.md
@@ -53,7 +53,7 @@ You can alternatively install the build from PlayStore or F-Droid.
3. Enable repo git hooks `git config core.hooksPath hooks`
4. Install dependencies using one of these methods:
- - **Using Melos (recommended):** Install Melos with `dart pub global activate melos`, then from any folder inside `mobile/`, run `melos bootstrap`. This will install dependencies, generate localization files, and automatically generate Rust bindings.
+ - **Using Melos (recommended):** Install Melos with `dart pub global activate melos`, then from any folder inside `mobile/`, run `melos bootstrap && melos run codegen:rust`. This will install dependencies, generate localization files, and automatically generate Rust bindings.
- **Using Flutter directly:** Run `flutter pub get`, then install [Flutter Rust Bridge](https://cjycode.com/flutter_rust_bridge/) with `cargo install flutter_rust_bridge_codegen` and run `flutter_rust_bridge_codegen generate` in both this folder and in `mobile/packages/rust`.
5. On Android:
diff --git a/mobile/melos.yaml b/mobile/melos.yaml
index f3dc3bf8b9..00d28a28cf 100644
--- a/mobile/melos.yaml
+++ b/mobile/melos.yaml
@@ -8,29 +8,13 @@ packages:
- packages/*
- apps/photos/plugins/*
-# Command configuration with hooks
-command:
- bootstrap:
- hooks:
- post: |
- # Install flutter_rust_bridge_codegen if not already installed
- cargo install flutter_rust_bridge_codegen 2>/dev/null || true
-
- # Generate Rust bindings for packages/rust
- echo "Generating flutter_rust_bridge bindings for packages/rust..."
- (cd packages/rust && flutter_rust_bridge_codegen generate)
-
- # Generate Rust bindings for apps/photos
- echo "Generating flutter_rust_bridge bindings for apps/photos..."
- (cd apps/photos && flutter_rust_bridge_codegen generate)
-
# Scripts that can be run with `melos run <script_name>`
scripts:
# The very first command you should run. It links all your local packages
# together and runs `flutter pub get` everywhere.
bootstrap:
run: melos bootstrap
- description: Bootstrap the workspace, linking local packages and generating Rust bindings.
+ description: Bootstrap the workspace, linking local packages.
# --- RUST CODEGEN COMMANDS ---
# These scripts run flutter_rust_bridge_codegen to generate Dart bindings from Rust code.