Skip to content

armgit / ente

Public Imported from GitHub
0

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

Rename

Manav Rathi16d1dc6e2211
diff --git a/mobile/apps/photos/rust/Cargo.lock b/mobile/apps/photos/rust/Cargo.lock
index 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.toml
index 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.lock
index 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.toml
index 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.md
index 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/):**
```sh
cargo 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/):**
```sh
flutter_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