mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-30 21:29:36 +02:00
feat(backend): migrate production backend to Rust
Replace the Go backend with the Rust workspace and route Android/iOS through UniFFI bindings. Include the migrated extension runtime, network, providers, media metadata, downloads and library operations, with version 5.0.0+147. Remove Go sources, adapters, native build selection and CI dependencies. Build Rust unconditionally and lock the iOS Rust pod using a relative path. Retain legacy source and migration evidence in a local ignored archive. Validation: Android Kotlin compile and 53 native tests; Swift Rust-branch equivalence and syntax; CocoaPods install; workflow, shell, Ruby, plist and diff checks. Reuse the preceding 100 Rust tests, fmt/Clippy and five-ABI build checkpoint; no new APK or iOS application build for this cleanup. Known follow-up: URL/URLSearchParams globals are missing from the Rust JS runtime. A controlled extension replay confirms a URL-resolution regression; this commit does not fix that runtime gap.
This commit is contained in:
1 parent
1da0da18a6
commit
aa99726439
452 files changed
+64417
-65088
No files matched your search
@@ -0,0 +1,32 @@
|
||||
final _iosSandboxRoot = RegExp(
|
||||
r'^(?:/private)?/var/mobile/Containers/Data/Application/[A-F0-9\-]+(?=/)'
|
||||
r'|^/[^\n]+/Library/Developer/CoreSimulator/Devices/[A-F0-9\-]+'
|
||||
r'/data/Containers/Data/Application/[A-F0-9\-]+(?=/)',
|
||||
caseSensitive: false,
|
||||
);
|
||||
|
||||
/// Restores an app-owned path after iOS relocates the app's data container.
|
||||
/// Bookmarked external folders must be resolved through their bookmark instead.
|
||||
String rebaseIosSandboxPath(String path, String documentsPath) {
|
||||
final current = _iosSandboxRoot.firstMatch(documentsPath);
|
||||
final previous = _iosSandboxRoot.firstMatch(path);
|
||||
if (current == null ||
|
||||
previous == null ||
|
||||
documentsPath.substring(current.end) != '/Documents') {
|
||||
return path;
|
||||
}
|
||||
|
||||
final suffix = path.substring(previous.end);
|
||||
const appDirectories = [
|
||||
'/Documents',
|
||||
'/Library/Application Support',
|
||||
'/Library/Caches',
|
||||
];
|
||||
if (!appDirectories.any(
|
||||
(directory) => suffix == directory || suffix.startsWith('$directory/'),
|
||||
) ||
|
||||
suffix.split('/').contains('..')) {
|
||||
return path;
|
||||
}
|
||||
return '${documentsPath.substring(0, current.end)}$suffix';
|
||||
}
|
||||
Reference in new issue
Block a user