π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Rename
Manav Rathi16d1dc6e2211
diff --git a/mobile/apps/photos/rust/Cargo.lock b/mobile/apps/photos/rust/Cargo.lockindex e24da77917..49e082907d 100644--- a/mobile/apps/photos/rust/Cargo.lock+++ b/mobile/apps/photos/rust/Cargo.lock@@ -310,7 +310,7 @@ dependencies = [][[package]]-name = "ente-photos-rust"+name = "ente_photos_rust"version = "0.0.1"dependencies = ["flutter_rust_bridge",diff --git a/mobile/apps/photos/rust/Cargo.toml b/mobile/apps/photos/rust/Cargo.tomlindex c845295819..96ce348658 100644--- a/mobile/apps/photos/rust/Cargo.toml+++ b/mobile/apps/photos/rust/Cargo.toml@@ -1,5 +1,5 @@[package]-name = "ente-photos-rust"+name = "ente_photos_rust"version = "0.0.1"edition = "2024"diff --git a/mobile/packages/rust/rust/Cargo.lock b/mobile/packages/rust/rust/Cargo.lockindex cb186ad0d3..2a8766314e 100644--- a/mobile/packages/rust/rust/Cargo.lock+++ b/mobile/packages/rust/rust/Cargo.lock@@ -209,7 +209,7 @@ name = "ente-core"version = "0.0.1"[[package]]-name = "ente-rust"+name = "ente_rust"version = "0.0.1"dependencies = ["ente-core",diff --git a/mobile/packages/rust/rust/Cargo.toml b/mobile/packages/rust/rust/Cargo.tomlindex 8193bf8e14..f486d3d87d 100644--- a/mobile/packages/rust/rust/Cargo.toml+++ b/mobile/packages/rust/rust/Cargo.toml@@ -1,5 +1,5 @@[package]-name = "ente-rust"+name = "ente_rust"version = "0.0.1"edition = "2024"diff --git a/rust/README.md b/rust/README.mdindex 7d4b44404e..f9178038d0 100644--- a/rust/README.md+++ b/rust/README.md@@ -15,7 +15,7 @@βΌ βΌ βΌβββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββ βββββββββββββββββββββββββββ mobile/packages/rust/ β β web/packages/wasm/ β β rust/cli/ β-β (ente-rust crate) β β (ente-wasm crate) β β β+β (ente_rust crate) β β (ente-wasm crate) β β ββ β β β β (future: when CLI ββ Shared #[frb] wrappers β β #[wasm_bindgen] wrappers β β uses ente-core) ββ for all mobile apps β β for all web apps β β β@@ -31,7 +31,7 @@βββββββββββββββββββββββββββββββ mobile/apps/photos/rust/ β-β (ente-photos-rust crate) β+β (ente_photos_rust crate) ββ ββ App-specific #[frb]: ββ usearch, ML, etc. β@@ -63,7 +63,7 @@ mobile/packages/rust/ # Shared FRB bindings for all mobile appsβββ rust/β βββ src/β β βββ api/ # #[frb] wrappers around ente-core-β βββ Cargo.toml # crate name: ente-rust+β βββ Cargo.toml # crate name: ente_rustβββ lib/ # Generated Dart bindingsβββ pubspec.yaml # Flutter plugin package@@ -72,15 +72,15 @@ mobile/apps/photos/rust/ # Photos app-specific FRB bindingsβ βββ lib.rsβ βββ api/ # #[frb] app-specific code (usearch, ML)β βββ *.rs-βββ Cargo.toml # crate name: ente-photos-rust+βββ Cargo.toml # crate name: ente_photos_rust```**Crates:**- `ente-core` - shared business logic (pure Rust, no FFI)- `ente-wasm` - wasm-bindgen wrappers for web-- `ente-rust` - shared FRB wrappers for mobile (Dart class: `EnteRust`)-- `ente-photos-rust` - Photos app-specific FRB (Dart class: `EntePhotosRust`)+- `ente_rust` - shared FRB wrappers for mobile (Dart class: `EnteRust`)+- `ente_photos_rust` - Photos app-specific FRB (Dart class: `EntePhotosRust`)## Tooling@@ -108,8 +108,8 @@ wasm-pack is installed via npm as a devDependency, so `yarn install` handles it.Used for Flutter integration. FRB is used on two crates:-- **`ente-rust`** (`mobile/packages/rust/`) - Shared wrappers around `ente-core`, used by multiple mobile apps (Photos, Auth, etc.)-- **`ente-photos-rust`** (`mobile/apps/photos/rust/`) - Photos app-specific functionality (usearch, ML)+- **`ente_rust`** (`mobile/packages/rust/`) - Shared wrappers around `ente-core`, used by multiple mobile apps (Photos, Auth, etc.)+- **`ente_photos_rust`** (`mobile/apps/photos/rust/`) - Photos app-specific functionality (usearch, ML)Both depend on `ente-core` and use `#[frb]` annotations to generate Dart bindings.@@ -149,7 +149,7 @@ yarn build:wasm # builds the WASM package> cargo watch -w ../rust/core -w packages/wasm/src -s "yarn build:wasm"> ```-**ente-rust (mobile/packages/rust/):**+**ente_rust (mobile/packages/rust/):**```shcargo install flutter_rust_bridge_codegen@@ -158,7 +158,7 @@ flutter_rust_bridge_codegen generate`flutter_rust_bridge_codegen generate` needs to be run either manually (or in watch mode, `flutter_rust_bridge_codegen generate --watch`) whenever the Rust source changes to get the bindings to update.-**ente-photos-rust (mobile/apps/photos/rust/):**+**ente_photos_rust (mobile/apps/photos/rust/):**```shflutter_rust_bridge_codegen generate@@ -205,6 +205,6 @@ wasm = ["getrandom/js"]## Tests- **ente-core:** Standard `cargo test` - comprehensive unit tests-- **ente-photos-rust:** Minimal FRB smoke test in Dart to catch binding drift+- **ente_photos_rust:** Minimal FRB smoke test in Dart to catch binding drift- **ente-wasm:** Vitest tests in web package- **Golden fixtures:** Share test vectors across native/FRB/WASM for crypto parity