π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Merge upstream main into ort_rust_desktop
laurenspriem30ccf13194be
diff --cc desktop/package-lock.jsonindex 0b2b6f2eed,65ed8610d9..e881fac77e--- a/desktop/package-lock.json+++ b/desktop/package-lock.json@@@ -3200,14 -1559,12 +3200,14 @@@"resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz","integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==","deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",- "license": "MIT"+ "dev": true,+ "license": "MIT",+ "optional": true},"node_modules/brace-expansion": {- "version": "5.0.6",- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",- "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",+ "version": "5.0.8",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.8.tgz",+ "integrity": "sha512-JZyDyq3D4AUifKTPOB7DELf6XsB3WdPuNxCtob1vFXPsSXhdAiHBWJ/tJ8HAc9aH84BK+5JFZLNkJKx3G9kzQg==","dev": true,"license": "MIT","dependencies": {diff --cc rust/bindings/frb/photos/Cargo.tomlindex ae4eb49eb8,0961f7c822..2de2f5b8f5--- a/rust/bindings/frb/photos/Cargo.toml+++ b/rust/bindings/frb/photos/Cargo.toml@@@ -6,9 -6,9 +6,9 @@@ edition = "2024crate-type = ["cdylib", "staticlib"][dependencies]- flutter_rust_bridge = "=2.12.0"ente-image.workspace = true-ente-photos.workspace = true+ente-photos = { workspace = true, features = ["usearch"] }+ flutter_rust_bridge.workspace = true[lints.rust]unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }diff --cc rust/bindings/frb/photos/src/api/ml_indexing_api.rsindex 659de09f4e,f95046e798..12cf6894c3--- a/rust/bindings/frb/photos/src/api/ml_indexing_api.rs+++ b/rust/bindings/frb/photos/src/api/ml_indexing_api.rs@@@ -152,9 -148,9 +149,9 @@@ pub fn release_ml_runtime()}pub fn analyze_image_rust(req: AnalyzeImageRequest) -> Result<AnalyzeImageResult, RustMlError> {- let shared_req = shared_indexing::AnalyzeImageRequest {+ let shared_req = indexing::AnalyzeImageRequest {file_id: req.file_id,- source: shared_indexing::ImageSource::Path(req.image_path),- image_path: req.image_path,++ source: indexing::ImageSource::Path(req.image_path),run_faces: req.run_faces,run_clip: req.run_clip,run_pets: req.run_pets,@@@ -225,17 -220,16 +222,17 @@@ fn to_model_paths(paths: &RustModelPath}}- impl From<SharedMlError> for RustMlError {- fn from(value: SharedMlError) -> Self {+ impl From<MlError> for RustMlError {+ fn from(value: MlError) -> Self {match value {- SharedMlError::InvalidRequest(message) => RustMlError::InvalidRequest(message),- SharedMlError::Decode(message) => RustMlError::Decode(message),- SharedMlError::Image(message) => RustMlError::Image(message),- SharedMlError::Preprocess(message) => RustMlError::Preprocess(message),- SharedMlError::Ort(message) => RustMlError::Ort(message),- SharedMlError::CorruptModel(message) => RustMlError::CorruptModel(message),- SharedMlError::Postprocess(message) => RustMlError::Postprocess(message),- SharedMlError::Runtime(message) => RustMlError::Runtime(message),+ MlError::InvalidRequest(message) => RustMlError::InvalidRequest(message),+ MlError::Decode(message) => RustMlError::Decode(message),++ MlError::Image(message) => RustMlError::Image(message),+ MlError::Preprocess(message) => RustMlError::Preprocess(message),+ MlError::Ort(message) => RustMlError::Ort(message),+ MlError::CorruptModel(message) => RustMlError::CorruptModel(message),+ MlError::Postprocess(message) => RustMlError::Postprocess(message),+ MlError::Runtime(message) => RustMlError::Runtime(message),}}}diff --cc rust/crates/photos/Cargo.tomlindex 4f0c822e0e,55b89925df..240f37b26e--- a/rust/crates/photos/Cargo.toml+++ b/rust/crates/photos/Cargo.toml@@@ -16,12 -14,14 +14,14 @@@ html-escape = "0.2.13image = { version = "0.25.5", default-features = true }imageproc = "0.25.0"nalgebra = "0.33.2"- half = "2.1"once_cell = "1.20.2"- regex = "1.11.1"- html-escape = "0.2.13"plsfix = "0.1.8"+ quick-xml = "0.41"+ regex = "1.11.1"thiserror.workspace = true+ # The FRB photos bridge calls the SimSIMD symbol exported by usearch 2.21.x.+ # Newer usearch releases switched that implementation to numkong symbols.-usearch = "=2.21.4"++usearch = { version = "=2.21.4", optional = true }# ORT source and revision are pinned once in the workspace manifest; only the# per-target feature sets are declared here.diff --cc rust/crates/photos/tests/support/ml_indexing.rsindex acf450a814,7269c9dd32..a517dcb7b0--- a/rust/crates/photos/tests/support/ml_indexing.rs+++ b/rust/crates/photos/tests/support/ml_indexing.rs@@@ -265,18 -231,17 +232,17 @@@ impl MlIndexingTestContextlet expected_unsupported = self.unsupported_decode_file_ids();let mut rust_results = HashMap::new();- for (index, fixture) in self.manifest.files.iter().enumerate() {+ for (index, (fixture, image_path)) in self+ .manifest+ .files+ .iter()+ .zip(&self.fixture_paths)+ .enumerate()+ {let file_id = file_id_for_manifest_path(&fixture.path)?;- let image_path = match self.resolve_fixture(fixture) {- Ok(path) => path,- Err(error) => {- failures.push(format!("{file_id}: failed to resolve fixture: {error:#}"));- continue;- }- };let req = AnalyzeImageRequest {file_id: (index + 1) as i64,- image_path: image_path.to_string_lossy().into_owned(),+ source: ImageSource::Path(image_path.to_string_lossy().into_owned()),run_faces: true,run_clip: true,run_pets: false,